Date: Fri, 23 Apr 1999 17:06:48 -0600 (GMT) >After I choose CCM >radiation for MPP MM5, I'd like to output some variables in >relation to radiation, but I don't know how to modify the >code (should modify radout.F), is there any example you can >give me how to add output variables? Thanks a lot. How you do this will depend on what variables you want to see and how you want to see them. One complexity is that radiation is called within a j-loop and so that from within the radiation package you can only ever output data for one j slice at a time. Furthermore, the data is, of course, decomposed so you can't just WRITE or PRINT it and have it come out in a sensible order. There are a couple of ways I handle this. If I the values for a single point or column will suffice, I put things like this in the code: if ( i .eq. IDEBUG .and. j .eq. JDEBUG .and. k .eq. KDEBUG ) then write(0,*)' at someplace ',i-idif_x0,j-jdif_x0, k write(0,*)' VAR(I,J,K) ', VAR(I,J,K) ... endif Assume that IDEBUG, JDEBUG, and KDEBUG are set to coordinates of the point you're interested in. You have to be careful about what loops you're in. The above would be put inside a triple nested loop (the j loop is outside the routine). If you were in the routine but outside any i or k loop, you would do something like this instead: if ( j .eq. JDEBUG ) then i = IDEBUG j = JDEBUG write(0,*)' at someplace ',i-idif_x0,j-jdif_x0, k write(0,*)' VAR(I,J,K) ', VAR(I,J,K) ... endif Note that you would use the name of j that's passed into the routine (not necessarily j; might be jslc or something). The i-idif_x0 converts the local index i to it's global value. Note that FLIC will handle most of the rest of this correctly -- if you're in doubt, though, and are getting weird results that don't make sense, have a look at the FLIC-expanded code in the little-f file that's generated in MPP/build . Note also that to see these, you will need to uncomment the line #RM=ECHO in MPP/RSL/Makefile.RSL. If you want to look at whole fields or whole layers, here's another trick. This will output to ascii file(s) all the values for a horizontal slice of an array, which can then be sorted an looked at post mortem. (assume we're back in a triply nested loop again): if ( k .eq. KDEBUG ) then write(80+rsl_myproc,*)ktau,i-idif_x0,j-jdif_x0,VAL(i,j,k) endif When the model runs, it will will generate files fort.80 on processor zero, fort.81, on processor one, and so on. The command: sort +0n -1 +1n -2 +2n -3 fort.8* > foo Will put the data into the file foo sorted correctly (i will be major and j minor -- you can fiddle with this to change the ordering). If there are multiple time steps, it will handle this correctly too. You can then inspect the values manually, or process them further to use your favorite plotter. I hope this helps. John