-
How do I estimate the CPU time needed for my MM5 simulation?
The fortran utility program, mm5-time.f
can give a rough estimate for cpu time required to run an MM5
job with specified domain configuration on NCAR's Cray J90 using
f90. However, if more accurate information is needed, you need
to run MM5 one time step to get the complexity factor (CF) used
in mm5-time.f.
CF = (one time step CPU) / (number of
grid points) / (3**nestlevel)
where the number of grid points is IX*JX*KX. For coarse domain,
the nestlevel is 0.
Alternatively, one can make use of the following numbers for
NCAR's Crays:
Cray YMP single processor
5.25 x 10 E-5 sec using cf77
Cray J90 single
1.05 x 10 E-4 sec using cf77
Cray J90se single
8.00 x 10 E-5 sec using f90
(non-hydrostatic, with a cumulus scheme and simple explicit scheme
[IMPHYS=4 in V2]). These numbers represent CPU seconds required
to compute at a single grid point and for a single time step.
One can obtain an estimated CPU time required for a single model
integration and a specific model configuration by multiplying
the total number of grids (IX*JX*KX), and total number of time
steps [total forecast time/time step (TISTEP in the MM5's namelist)].
-
How do I estimate the memory needed for my MM5 simulation?
The fortran utility program, mm5-memory.f
can give a first-cut estimation for required memory. However,
if more accurate information is needed, you need to run MM5 one
time step to get the memory information.
-
Can I use MM5 for idealized modeling studies?
MM5 model is designed for real-data modeling studies and NWP.
But people have successfully used the model for some idealized
modeling work. Care must be taken in such an exercise. We have
some guidelines for you if
you would like to do so. Note that this is not a STANDARD use
of the model, therefore support is limited, and you have to be
responsible for making changes to the modeling system programs
wherever is needed. We also suggest that you should first understand
the modeling system as it is before you undertake such an exercise.
Martin Leutbecker of Germany has provided us a tar file for undertaking
such an exercise. This tar file is available from NCAR's anonymous
ftp site, and the file name is ideal.tar. It works for V2
system. If you are interested in trying it in V3, try this
site.
-
How do I compile and run MM5 with five nests?
- Since version 3.7 (December 2004), MM5
can be run with 6 nests (so a mother domain and 5 nest levels).
- Older MM5 versions, by default, can only be run with 4 nests
(so a mother domain and 3 nest levels).
- So if you plan on running with more than 5 nests (a mother and
4 nests levels), you can either get the new code, or make the
following change to your older MM5 code.
The default MM5 code (whether it is V2 or V3) can only allow 3-level
of nesting and maximum of 10 domains. That means the namelist
variables LEVIDN cannot exceed 3, though NUMNC can be 9 (and MAXNES
can be 10).
If you want to run MM5 with more than 3-level of nesting, it
is simple enough to modify the code to do so. First go to source
code directory domain/drivers, and copy subroutine nstlev3.F
to nstlev4.F. Then edit subroutine nstlev3.F, and find
the line that calls nstlev4 and uncomment it. So now you should
have a line of Fortran code that looks
IF(NUMLV(IDLEV+1,L).GT.0)CALL NSTLEV4(IEXEC,L)
Next, edit the new subroutine nstlev4.F. Change the first line
of the subroutine to
SUBROUTINE NSTLEV4(IEXEC,ICOARS)
Also, you need to modify the Makefile in domain/drivers to include
nstlev4.F. Now you have the code that can be compiled with MAXNES=5,
and LEVIDN > 3. Similar changes can be made to compile and run
MM5 code with more levels of nesting.
If you running the MPP MM5 version of the code, you need
to make one extra change (If you have previously compiled
the code for MPP, do a "make uninstall" after the change
below, and before you again do a "make mpp"):
Change the following lines in MM5/MPP/mpp_objects_all:
#ifdef NESTED
NEST_OBJ = initnest.o chknst.o
\
nstlev1.o nstlev2.o nstlev3.o \
$(MP_STOTNDT) smt2.o bcast_size.o \
merge_size.o mp_feedbk.o \
rdter.o
#endif
to look like this:
#ifdef NESTED
NEST_OBJ = initnest.o chknst.o
\
nstlev1.o nstlev2.o nstlev3.o nstlev4.o
\
$(MP_STOTNDT) smt2.o bcast_size.o \
merge_size.o mp_feedbk.o \
rdter.o
#endif
-
How to add a (real) pointer array?
- 2-D arrays:
Change NVARSX from the current value (which is 47 in V3.5) to
the new number in include/parame. For example, if you want
to add two 2-D arrays, set NVARSX = 49.
Modify include/point2d.incl to define the new pointers. Note
that where you add the pointer in common block /ADDR2 matters.
If you add new ones, it is better to add to the end. A similar
change needs to be added to point2dn.incl.
- 3-D arrays:
You can always add your own common blocks, but it is more involved.
It is easier to add a pointer array to an existing common block.
Example 1:
If you want to add a cloud related 3-D array, add it to NVARMX
in include/parame.
Then modify point3d.incl to add the array name and its pointer.
For example, one may add a new 3D real array this way (suppose
the model also needs to keep 2 time-levels of the variable - in
other words, we want to add QNEW, but since we need 2 time-levels,
we will add two variables QNEWA and QNEWB, rather than one variable
only): change
REAL QCA,QCB,QRA,QRB
POINTER (IAQCA,QCA(MIXM,MJXM,MKXM)),(IAQCB,QCB(MIXM,MJXM,MKXM)),
1 (IAQRA,QRA(MIXM,MJXM,MKXM)),
(IAQRB,QRB(MIXM,MJXM,MKXM)
So that the new lines look like
REAL QCA,QCB,QRA,QRB,QNEWA,QNEWB
POINTER (IAQCA,QCA(MIXM,MJXM,MKXM)),(IAQCB,QCB(MIXM,MJXM,MKXM)),
1 (IAQRA,QRA(MIXM,MJXM,MKXM)), (IAQRB,QRB(MIXM,MJXM,MKXM)),
2 (IAQNEWA,QNEWA(MIXM,MJXM,MKXM),(IAQNEWB,QNEWB(MIXM,MJXM,MKXM))
Note that the new array is dimensioned by MIXM, MJXM and MKXM
which are defined only if IMPHYS >= 3. Then add the pointer to
the common block /ADDR1. Remember you'll have to add this new
one in the order that the pointers are listed. In this example,
it means right after pointer IAQRB, or
COMMON/ADDR1/ IAUA, IAUB,
IAVA, IAVB, IATA, IATB,IAQVA,
1 IAQVB, IAQCA, IAQCB, IAQRA,
IAQRB, IAQNEWA, IAQNEWB, IAQIA,
2 IAQIB, IAQNIA, IAQNIB,
IAQGA, IAQGB, IAQNCA, IAQNCB
Make a similar change in point3dn.incl.
Example 2:
If you want to add a basic 3-D array, add it to NVARX in include/parame.
Then modify point3d.incl to add the array name and its pointer.
In this case one will add a new 3D real array this way (this
time we will only keep one time-level): change
REAL QVA,QVB,TA,TB,UA,UB,VA,VB
POINTER ( IAUA,
UA(MIX,MJX,MKX)), ( IAUB, UB(MIX,MJX,MKX)),
1
( IAVA, VA(MIX,MJX,MKX)), ( IAVB, VB(MIX,MJX,MKX)),
2
( IATA, TA(MIX,MJX,MKX)), ( IATB, TB(MIX,MJX,MKX)),
3
(IAQVA,QVA(MIX,MJX,MKX)), (IAQVB,QVB(MIX,MJX,MKX))
So that the new lines look like
REAL QVA,QVB,TA,TB,UA,UB,VA,VB,TNEW
POINTER ( IAUA,
UA(MIX,MJX,MKX)), ( IAUB, UB(MIX,MJX,MKX)),
1
( IAVA, VA(MIX,MJX,MKX)), ( IAVB, VB(MIX,MJX,MKX)),
2
( IATA, TA(MIX,MJX,MKX)), ( IATB, TB(MIX,MJX,MKX)),
3
(IAQVA, QVA(MIX,MJX,MKX)), (IAQVB,QVB(MIX,MJX,MKX)),
4
(IATNEW,TNEW(MIX,MJX,MKX))
Note that in this case the new array is dimensioned by MIX, MJX
and MKX. Then add the pointer to the common block /ADDR1. Remember
you'll have to add this new one in the order that the pointers
are listed. In this example, it means right after pointer
IAQVB, or
COMMON/ADDR1/ IAUA, IAUB,
IAVA, IAVB, IATA, IATB,IAQVA,
1 IAQVB, IATNEW,
IAQCA, IAQCB, IAQRA, IAQRB, IAQIA, IAQIB,
2 IAQNIA, IAQNIB, IAQGA,
IAQGB, IAQNCA, IAQNCB
Make a similar change in point3dn.incl.
If you do this for both 2-D and 3-D pointer arrays, you won't
need to modify anything else. Since the array is declared in the
pointer include files (i.e., point3d.incl, etc.), it will be available
in any subroutine that has (for instance):
#include < point3d.incl >
They can be passed from SOLVE, for example, through argument
lists to subroutines that don't already have the above include
line.
- Running Noah LSM with FNL input data
Early 2005, FNL change the number of soil levels in their GRIB
files. REGRIB is set up to extract the old levels. If you want
to run Noah LSM with later FNL data you need to make the following
changes:
Change the Vtable for SOIL -
FROM:
11 | 112 | 0 |
10 | SOILT010 | K |
T 0-10
|
11 | 112 | 10 | 200 | SOILT200 | K |
T 10-200 |
144 | 112 | 0 | 10 | SOILM010 | fraction| Soil Moist
0-10 |
144 | 112 | 10 | 200 | SOILM200 | fraction| Soil Moist
10-200 |