diff -crN WRFV3/arch/configure_new.defaults WRFV3-fix/arch/configure_new.defaults *** WRFV3/arch/configure_new.defaults 2011-03-26 04:57:06.000000000 +0900 --- WRFV3-fix/arch/configure_new.defaults 2011-04-09 07:05:14.000000000 +0900 *************** *** 973,983 **** OMP = # -qsmp=noauto OMPCC = # -qsmp=noauto # these have to be the same as DM_FC on surveyor or it fails with weird errors in time manager ! SFC = time mpixlf90_r ! SCC = time mpixlc_r ! CCOMP = time mpixlc_r ! DM_FC = time mpixlf90_r ! DM_CC = time mpixlc_r -DMPI2_SUPPORT FC = $(DM_FC) CC = $(DM_CC) -DFSEEKO64_OK LD = $(FC) --- 973,983 ---- OMP = # -qsmp=noauto OMPCC = # -qsmp=noauto # these have to be the same as DM_FC on surveyor or it fails with weird errors in time manager ! SFC = mpixlf90_r ! SCC = mpixlc_r ! CCOMP = mpixlc_r ! DM_FC = mpixlf90_r ! DM_CC = mpixlc_r -DMPI2_SUPPORT FC = $(DM_FC) CC = $(DM_CC) -DFSEEKO64_OK LD = $(FC) diff -crN WRFV3/arch/noopt_exceptions_f WRFV3-fix/arch/noopt_exceptions_f *** WRFV3/arch/noopt_exceptions_f 2010-12-14 00:04:47.000000000 +0900 --- WRFV3-fix/arch/noopt_exceptions_f 2011-09-15 18:05:47.693119271 +0900 *************** *** 49,54 **** --- 49,56 ---- module_state_description.o : module_state_description.F output_wrf.o : output_wrf.F solve_interface.o : solve_interface.F + solve_em.o : solve_em.F + shift_domain.o :shift_domain.F start_domain.o : start_domain.F start_domain_nmm.o : start_domain_nmm.F start_em.o : start_em.F *************** *** 87,92 **** --- 89,96 ---- module_tiles.o \ output_wrf.o \ solve_interface.o \ + solve_em.o \ + shift_domain.o \ start_domain.o \ start_domain_nmm.o \ shift_domain_nmm.o \ diff -crN WRFV3/configure WRFV3-fix/configure *** WRFV3/configure 2011-03-21 03:00:34.000000000 +0900 --- WRFV3-fix/configure 2011-09-15 18:06:20.829120612 +0900 *************** *** 561,570 **** SCC=`grep '^SCC' configure.wrf | awk '{print $3}'` CCOMP=`grep '^CCOMP' configure.wrf | awk '{print $3}'` - SFC="`type $SFC 2>/dev/null | awk '{print $NF}' | sed -e 's/(//g;s/)//g'`" - SCC="`type $SCC 2>/dev/null | awk '{print $NF}' | sed -e 's/(//g;s/)//g'`" - CCOMP="`type $CCOMP 2>/dev/null | awk '{print $NF}' | sed -e 's/(//g;s/)//g'`" - if [ -e $NETCDF/lib/libnetcdf.a -a "$SFC" != "" -a "$SCC" != "" -a "$CCOMP" != "" ]; then SFC_MULTI_ABI=0 --- 561,566 ---- *************** *** 572,578 **** CCOMP_MULTI_ABI=0 CROSS_COMPILING=0 ! foo=`mktemp foo_$$` echo echo Testing for NetCDF, C and Fortran compiler --- 568,574 ---- CCOMP_MULTI_ABI=0 CROSS_COMPILING=0 ! foo=foo_$$ echo echo Testing for NetCDF, C and Fortran compiler *************** *** 592,621 **** end program test_exit EOF ! ar p $NETCDF/lib/libnetcdf.a netcdf.o > ${foo}.o netcdf_arch="`file ${foo}.o | grep -o -E '[0-9]{2}-bit|i386'`" rm ${foo}.o $SFC -o ${foo} ${foo}.f > /dev/null 2>&1 SFC_arch="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`" ! rm ${foo} 2> /dev/null $SCC -o ${foo} ${foo}.c > /dev/null 2>&1 SCC_arch="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`" CCOMP_arch=$SCC_arch ! rm ${foo} 2> /dev/null if [ "$SCC" != "$CCOMP" ]; then $CCOMP -o ${foo} ${foo}.c > /dev/null 2>&1 CCOMP_arch="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`" ! rm ${foo} 2> /dev/null fi if [ "$SFC_arch" = "" -o "$SCC_arch" = "" -o "$CCOMP_arch" = "" ]; then echo " One of compilers testing failed!" echo " Please check your compiler" echo ! rm ${foo}* 2> /dev/null exit else cp configure.wrf configure.wrf.edit --- 588,617 ---- end program test_exit EOF ! ar p $NETCDF/lib/libnetcdf.a > ${foo}.o netcdf_arch="`file ${foo}.o | grep -o -E '[0-9]{2}-bit|i386'`" rm ${foo}.o $SFC -o ${foo} ${foo}.f > /dev/null 2>&1 SFC_arch="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`" ! rm ${foo} ${foo}.o 2> /dev/null $SCC -o ${foo} ${foo}.c > /dev/null 2>&1 SCC_arch="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`" CCOMP_arch=$SCC_arch ! rm ${foo} ${foo}.o 2> /dev/null if [ "$SCC" != "$CCOMP" ]; then $CCOMP -o ${foo} ${foo}.c > /dev/null 2>&1 CCOMP_arch="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`" ! rm ${foo} ${foo}.o 2> /dev/null fi if [ "$SFC_arch" = "" -o "$SCC_arch" = "" -o "$CCOMP_arch" = "" ]; then echo " One of compilers testing failed!" echo " Please check your compiler" echo ! rm -f ${foo} ${foo}.[cfo] 2> /dev/null exit else cp configure.wrf configure.wrf.edit *************** *** 736,742 **** mv configure.wrf.edit configure.wrf fi ! rm ${foo}* 2> /dev/null if [ $CROSS_COMPILING -eq 0 ] ; then echo This installation NetCDF is $netcdf_arch --- 732,738 ---- mv configure.wrf.edit configure.wrf fi ! rm -f ${foo} ${foo}.[cfo] 2> /dev/null if [ $CROSS_COMPILING -eq 0 ] ; then echo This installation NetCDF is $netcdf_arch diff -crN WRFV3/dyn_em/module_initialize_real.F WRFV3-fix/dyn_em/module_initialize_real.F *** WRFV3/dyn_em/module_initialize_real.F 2011-04-05 21:55:15.000000000 +0900 --- WRFV3-fix/dyn_em/module_initialize_real.F 2011-09-15 18:04:51.804116999 +0900 *************** *** 631,636 **** --- 631,637 ---- END DO END IF + IF ( any_valid_points ) THEN ! Check for and semi-fix missing surface fields. IF ( grid%p_gc(i_valid,num_metgrid_levels,j_valid) .LT. grid%p_gc(i_valid,2,j_valid) ) THEN *************** *** 691,697 **** CALL wrf_message ( a_message ) END IF - ! Compute the mixing ratio from the input relative humidity. IF ( ( flag_qv .NE. 1 ) .AND. ( flag_sh .NE. 1 ) ) THEN --- 692,697 ---- *************** *** 773,778 **** --- 773,786 ---- END DO END IF + ! If the pressure levels in the middle of the atmosphere are upside down, then + ! this is hybrid data. Computing the new surface pressure should use sfcprs2. + + IF ( grid%p_gc(i_valid,num_metgrid_levels/2,j_valid) .LT. grid%p_gc(i_valid,num_metgrid_levels/2+1,j_valid) ) THEN + config_flags%sfcp_to_sfcp = .TRUE. + END IF + END IF + ! Assign surface fields with original input values. If this is hybrid data, ! the values are not exactly representative. However - this is only for ! plotting purposes and such at the 0h of the forecast, so we are not all that *************** *** 910,922 **** END DO END DO - ! If the pressure levels in the middle of the atmosphere are upside down, then - ! this is hybrid data. Computing the new surface pressure should use sfcprs2. - - IF ( grid%p_gc(i_valid,num_metgrid_levels/2,j_valid) .LT. grid%p_gc(i_valid,num_metgrid_levels/2+1,j_valid) ) THEN - config_flags%sfcp_to_sfcp = .TRUE. - END IF - ! Two ways to get the surface pressure. 1) If we have the low-res input surface ! pressure and the low-res topography, then we can do a simple hydrostatic ! relation. 2) Otherwise we compute the surface pressure from the sea-level --- 918,923 ---- *************** *** 1455,1460 **** --- 1456,1462 ---- ! surface_input_source=2 => use data from grib file (dominant category as input) ! surface_input_source=3 => use dominant data from static file (dominant category as input) + IF ( any_valid_points ) THEN IF ( config_flags%surface_input_source .EQ. 1 ) THEN ! Generate the vegetation and soil category information from the fractional input *************** *** 1537,1542 **** --- 1539,1545 ---- END IF END IF + END IF ! Adjustments for the seaice field PRIOR to the grid%tslb computations. This is ! is for the 5-layer scheme. diff -crN WRFV3/dyn_em/module_stoch.F WRFV3-fix/dyn_em/module_stoch.F *** WRFV3/dyn_em/module_stoch.F 2011-03-05 09:46:55.000000000 +0900 --- WRFV3-fix/dyn_em/module_stoch.F 2011-09-15 18:05:04.669117522 +0900 *************** *** 887,892 **** --- 887,893 ---- seed1 = newtime+iphys+nens*1000000 + idiv = 7 ! just some non-unity divisor seed2 = mod(newtime+iphys+nens*1000000,idiv) if(is_print) print *,'Rand_seed (iphys/newtime/idiv):',iphys,newtime,idiv,nens diff -crN WRFV3/phys/module_cu_g3.F WRFV3-fix/phys/module_cu_g3.F *** WRFV3/phys/module_cu_g3.F 2011-03-12 03:22:27.000000000 +0900 --- WRFV3-fix/phys/module_cu_g3.F 2011-09-15 18:05:34.381118730 +0900 *************** *** 3119,3125 **** pcrit,acrit,acritt integer :: nall2,ixxx,irandom ! integer, dimension (8) :: seed DATA PCRIT/850.,800.,750.,700.,650.,600.,550.,500.,450.,400., & --- 3119,3125 ---- pcrit,acrit,acritt integer :: nall2,ixxx,irandom ! integer, allocatable :: seed(:) DATA PCRIT/850.,800.,750.,700.,650.,600.,550.,500.,450.,400., & *************** *** 3130,3135 **** --- 3130,3137 ---- DATA ACRITT/.203,.515,.521,.566,.625,.665,.659,.688, & .743,.813,.886,.947,1.138,1.377,1.896/ ! + call random_seed(size=i) + allocate(seed(i)) seed=0 seed(2)=j seed(3)=ktau *************** *** 3591,3596 **** --- 3593,3599 ---- enddo endif 100 continue + deallocate(seed) END SUBROUTINE cup_forcing_ens_3d