From f94fbf513473b8b308e13cec6b2239eab547a39b Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Fri, 20 Sep 2019 18:42:18 +0000 Subject: [PATCH 1/5] update modules for jet --- modulefiles/post/v8.0.0-jet | 17 +++++++++++------ sorc/ncep_post.fd/makefile_module | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/modulefiles/post/v8.0.0-jet b/modulefiles/post/v8.0.0-jet index 3f6645a9d..982bc834f 100644 --- a/modulefiles/post/v8.0.0-jet +++ b/modulefiles/post/v8.0.0-jet @@ -15,7 +15,8 @@ module-whatis "post" set ver v8.0.0 # Loading Intel Compiler Suite -module load intel/15.0.3.187 +#module load intel/15.0.3.187 +module load intel/18.0.5.274 module load impi module use /contrib/modulefiles @@ -37,15 +38,19 @@ module load sp/v2.0.2 module load w3emc/v2.2.0 module load w3nco/v2.0.6 module load crtm/v2.2.3 -module load netcdf/3.6.3 +#module load netcdf/3.6.3 +module load netcdf/4.6.1 setenv NCEPLIBS /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/modulefiles module load g2tmpl-intel/1.5.0 -module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/modulefiles -module load wrf-io-v1.1.1 +#module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/modulefiles +#module load wrf-io-v1.1.1 +# +setenv WRFIO_LIB /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/v1.1.1/lib/wrf_io/libwrfio_nf.a + set dlib /mnt/lfs3/projects/hfv3gfs/gwv/ltmp2/lib/g2/v3.1.0/ set bname "G2" @@ -60,8 +65,8 @@ setenv ${bname}_VER v3.1.0 #setenv WRFPATH /mnt/lfs3/projects/hfv3gfs/nwprod/wrf_shared.v1.1.0/ setenv myFC mpiifort -setenv OPENMP "-openmp" -setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -openmp -fpp" +setenv OPENMP "-qopenmp" +setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp" # #setenv myFCFLAGS "-O0 -convert big_endian -fp-model source -openmp -g -check all -ftrapuv -fp-stack-check -fstack-protector -heap-arrays -recursive -traceback" diff --git a/sorc/ncep_post.fd/makefile_module b/sorc/ncep_post.fd/makefile_module index b4677b119..8e13f9f42 100755 --- a/sorc/ncep_post.fd/makefile_module +++ b/sorc/ncep_post.fd/makefile_module @@ -27,7 +27,7 @@ CPPFLAGS = -DLINUX FREE = -FR NETCDF_INC = -I$(NETCDF)/include -NETCDF_LDFLAGS = -L$(NETCDF)/lib -lnetcdf +NETCDF_LDFLAGS = -L$(NETCDF)/lib -lnetcdff -lnetcdf CFLAGS = -DLINUX -Dfunder -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' From 2eb40f23fbf1d39ae8e1f9ff6e59e196767d1d5f Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Fri, 13 Dec 2019 14:34:49 -0500 Subject: [PATCH 2/5] Reg latlon update (#29) * update modules for jet * update for regular lat-lon grids to FV3 output change on coordinate --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 9984b2388..1a96c5af1 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -531,6 +531,18 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) end do lonstart = nint(glon1d(1)*gdsdegr) lonlast = nint(glon1d(im)*gdsdegr) + +! Jili Dong add support for regular lat lon (2019/03/22) start + if (MAPTYPE .eq. 0) then + if(lonstart<0.)then + lonstart=lonstart+360.*gdsdegr + end if + if(lonlast<0.)then + lonlast=lonlast+360.*gdsdegr + end if + end if +! Jili Dong add support for regular lat lon (2019/03/22) end + else if(numDims==2)then Status=nf90_get_var(ncid3d,varid,dummy) if(maxval(abs(dummy))<2.0*pi)convert_rad_to_deg=.true. From 9f166ece66b7961083fbfd72594bbc07729e66ba Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Sun, 15 Dec 2019 18:05:22 -0500 Subject: [PATCH 3/5] Post g2tmpl (#32) * 1)Update with g2tmp/1.6.0; 2)Sync new routines into makefile for building post library. * Switch to intel/16.3.210 for Cray. * Upgrade with g2tmpl v1.6.0 on Hera. --- .../post/{lib-v8.0.0-cray-intel => lib-cray-intel} | 7 +++++-- modulefiles/post/{lib-v8.0.0-hera => lib-hera} | 2 +- modulefiles/post/{lib-v8.0.0-wcoss => lib-wcoss} | 0 .../{lib-v8.0.0-wcoss_dell_p3 => lib-wcoss_dell_p3} | 3 ++- modulefiles/post/v8.0.0-cray-intel | 7 +++++-- modulefiles/post/v8.0.0-hera | 8 +++++--- modulefiles/post/v8.0.0-wcoss_dell_p3 | 3 ++- parm/post_avblflds.xml | 10 ---------- parm/postxconfig-NT-GFS-GOES.txt | 8 ++++---- sorc/ncep_post.fd/build_ncepost_lib.sh | 4 ++-- sorc/ncep_post.fd/makefile_lib | 9 +++++---- 11 files changed, 31 insertions(+), 30 deletions(-) rename modulefiles/post/{lib-v8.0.0-cray-intel => lib-cray-intel} (88%) rename modulefiles/post/{lib-v8.0.0-hera => lib-hera} (98%) rename modulefiles/post/{lib-v8.0.0-wcoss => lib-wcoss} (100%) rename modulefiles/post/{lib-v8.0.0-wcoss_dell_p3 => lib-wcoss_dell_p3} (93%) diff --git a/modulefiles/post/lib-v8.0.0-cray-intel b/modulefiles/post/lib-cray-intel similarity index 88% rename from modulefiles/post/lib-v8.0.0-cray-intel rename to modulefiles/post/lib-cray-intel index 3c34033ae..054346457 100755 --- a/modulefiles/post/lib-v8.0.0-cray-intel +++ b/modulefiles/post/lib-cray-intel @@ -33,7 +33,8 @@ module use -a /gpfs/hps/nco/ops/nwprod/lib/modulefiles # Loading Intel Compiler Suite module load PrgEnv-intel module load craype-sandybridge -module switch intel intel/15.0.3.187 +#module switch intel intel/15.0.3.187 +module switch intel intel/16.3.210 module load craype/2.3.0 # Loading nceplibs modules @@ -41,7 +42,9 @@ module load jasper-gnu-sandybridge/1.900.1 module load png-gnu-sandybridge/1.2.49 module load zlib-gnu-sandybridge/1.2.7 module load g2-intel/3.1.0 -module load g2tmpl-intel/1.5.0 +module use -a /usrx/local/nceplibs/NCEPLIBS/modulefiles +module load g2tmpl/1.6.0 +#module load g2tmpl-intel/1.5.0 #module load xmlparse/v2.0.0 module load w3emc-intel/2.2.0 diff --git a/modulefiles/post/lib-v8.0.0-hera b/modulefiles/post/lib-hera similarity index 98% rename from modulefiles/post/lib-v8.0.0-hera rename to modulefiles/post/lib-hera index 715b5c7f9..462f549d0 100755 --- a/modulefiles/post/lib-v8.0.0-hera +++ b/modulefiles/post/lib-hera @@ -39,7 +39,7 @@ module load jasper/1.900.1 module load png/1.2.44 module load z/1.2.11 module load g2/3.1.0 -module load g2tmpl/1.5.0 +module load g2tmpl/1.6.0 #module load xmlparse/v2.0.0 module load w3emc/2.3.1 diff --git a/modulefiles/post/lib-v8.0.0-wcoss b/modulefiles/post/lib-wcoss similarity index 100% rename from modulefiles/post/lib-v8.0.0-wcoss rename to modulefiles/post/lib-wcoss diff --git a/modulefiles/post/lib-v8.0.0-wcoss_dell_p3 b/modulefiles/post/lib-wcoss_dell_p3 similarity index 93% rename from modulefiles/post/lib-v8.0.0-wcoss_dell_p3 rename to modulefiles/post/lib-wcoss_dell_p3 index 97f3506a3..e0e9f12ab 100755 --- a/modulefiles/post/lib-v8.0.0-wcoss_dell_p3 +++ b/modulefiles/post/lib-wcoss_dell_p3 @@ -37,7 +37,8 @@ module load jasper/1.900.1 module load libpng/1.2.59 module load zlib/1.2.11 module load g2/3.1.0 -module load g2tmpl/1.5.0 +module use -a /usrx/local/nceplibs/dev/NCEPLIBS/modulefiles +module load g2tmpl/1.6.0 #module load xmlparse/v2.0.0 module load w3emc/2.3.0 diff --git a/modulefiles/post/v8.0.0-cray-intel b/modulefiles/post/v8.0.0-cray-intel index 88d9c510f..ee663a24f 100644 --- a/modulefiles/post/v8.0.0-cray-intel +++ b/modulefiles/post/v8.0.0-cray-intel @@ -19,7 +19,8 @@ module use -a /usrx/local/prod/modulefiles module use -a /gpfs/hps/nco/ops/nwprod/lib/modulefiles module load PrgEnv-intel module load craype-sandybridge -module switch intel intel/15.0.3.187 +#module switch intel intel/15.0.3.187 +module switch intel intel/16.3.210 module load craype/2.3.0 module load prod_util/1.0.33 module load cray-libsci/13.0.3 @@ -47,7 +48,9 @@ module load cray-netcdf/4.3.2 # module load NetCDF-cray-sandybridge/3.6.3 #### module load cray-netcdf/4.3.2 #module load g2tmpl-intel/1.4.0 -module load g2tmpl-intel/1.5.0 +module use -a /usrx/local/nceplibs/NCEPLIBS/modulefiles +module load g2tmpl/1.6.0 +#module load g2tmpl-intel/1.5.0 module load wrfio-intel/1.1.1 setenv myFC ftn diff --git a/modulefiles/post/v8.0.0-hera b/modulefiles/post/v8.0.0-hera index 3e03cc541..9155735a6 100644 --- a/modulefiles/post/v8.0.0-hera +++ b/modulefiles/post/v8.0.0-hera @@ -15,8 +15,10 @@ module-whatis "post" set ver v8.0.0 # Loading Intel Compiler Suite -module load intel/19.0.4.243 -module load impi/2019.0.4 +#module load intel/19.0.4.243 +#module load impi/2019.0.4 +module load intel/18.0.5.274 +module load impi/2018.0.4 #module use /contrib/modulefiles module use -a /scratch2/NCEPDEV/nwprod/NCEPLIBS/modulefiles @@ -39,7 +41,7 @@ module load w3nco/2.0.7 module load crtm/2.2.5 #module load netcdf/3.6.3 module load netcdf/4.7.0 -module load g2tmpl/1.5.1 +module load g2tmpl/1.6.0 module load wrfio/1.1.1 #setenv WRFPATH /scratch3/NCEPDEV/nwprod/sorc/wrf_shared.v1.1.0 diff --git a/modulefiles/post/v8.0.0-wcoss_dell_p3 b/modulefiles/post/v8.0.0-wcoss_dell_p3 index d84ede9ed..04e1e9c02 100644 --- a/modulefiles/post/v8.0.0-wcoss_dell_p3 +++ b/modulefiles/post/v8.0.0-wcoss_dell_p3 @@ -32,9 +32,10 @@ module load sp/2.0.2 module load w3emc/2.3.0 module load w3nco/2.0.6 module load NetCDF/4.5.0 -module load g2tmpl/1.5.0 module load crtm/2.2.6 module load wrfio/1.1.1 +module use -a /usrx/local/nceplibs/dev/NCEPLIBS/modulefiles +module load g2tmpl/1.6.0 setenv myFC mpiifort setenv OPENMP "-qopenmp" diff --git a/parm/post_avblflds.xml b/parm/post_avblflds.xml index 1f253bf4e..9e4fe8d6f 100755 --- a/parm/post_avblflds.xml +++ b/parm/post_avblflds.xml @@ -6821,7 +6821,6 @@ 958 SBTAGR7_ON_TOP_OF_ATMOS SBTAGR7 - NCEP top_of_atmos 4.0 @@ -6830,7 +6829,6 @@ 959 SBTAGR8_ON_TOP_OF_ATMOS SBTAGR8 - NCEP top_of_atmos 4.0 @@ -6839,7 +6837,6 @@ 960 SBTAGR9_ON_TOP_OF_ATMOS SBTAGR9 - NCEP top_of_atmos 4.0 @@ -6848,7 +6845,6 @@ 961 SBTAGR10_ON_TOP_OF_ATMOS SBTAGR10 - NCEP top_of_atmos 4.0 @@ -6857,7 +6853,6 @@ 962 SBTAGR11_ON_TOP_OF_ATMOS SBTAGR11 - NCEP top_of_atmos 4.0 @@ -6866,7 +6861,6 @@ 963 SBTAGR12_ON_TOP_OF_ATMOS SBTAGR12 - NCEP top_of_atmos 4.0 @@ -6875,7 +6869,6 @@ 964 SBTAGR13_ON_TOP_OF_ATMOS SBTAGR13 - NCEP top_of_atmos 4.0 @@ -6884,7 +6877,6 @@ 965 SBTAGR14_ON_TOP_OF_ATMOS SBTAGR14 - NCEP top_of_atmos 4.0 @@ -6893,7 +6885,6 @@ 966 SBTAGR15_ON_TOP_OF_ATMOS SBTAGR15 - NCEP top_of_atmos 4.0 @@ -6902,7 +6893,6 @@ 967 SBTAGR16_ON_TOP_OF_ATMOS SBTAGR16 - NCEP top_of_atmos 4.0 diff --git a/parm/postxconfig-NT-GFS-GOES.txt b/parm/postxconfig-NT-GFS-GOES.txt index 9e37655af..e23e1f5d9 100644 --- a/parm/postxconfig-NT-GFS-GOES.txt +++ b/parm/postxconfig-NT-GFS-GOES.txt @@ -170,7 +170,7 @@ SBTAGR8_ON_TOP_OF_ATMOS 1 tmpl4_0 SBTAGR8 -NCEP +? ? top_of_atmos 0 @@ -207,7 +207,7 @@ SBTAGR9_ON_TOP_OF_ATMOS 1 tmpl4_0 SBTAGR9 -NCEP +? ? top_of_atmos 0 @@ -244,7 +244,7 @@ SBTAGR10_ON_TOP_OF_ATMOS 1 tmpl4_0 SBTAGR10 -NCEP +? ? top_of_atmos 0 @@ -281,7 +281,7 @@ SBTAGR13_ON_TOP_OF_ATMOS 1 tmpl4_0 SBTAGR13 -NCEP +? ? top_of_atmos 0 diff --git a/sorc/ncep_post.fd/build_ncepost_lib.sh b/sorc/ncep_post.fd/build_ncepost_lib.sh index a5f79f8ae..1364a21c9 100755 --- a/sorc/ncep_post.fd/build_ncepost_lib.sh +++ b/sorc/ncep_post.fd/build_ncepost_lib.sh @@ -22,7 +22,7 @@ export version=${1:-"v8.0.0"} moduledir=`dirname $(readlink -f ../../modulefiles/post)` module use -a ${moduledir} -module load post/lib-${version}-${machine} +module load post/lib-${machine} #module load nceppost_modulefile # @@ -37,7 +37,7 @@ cd ${BASE} rm *.o *.mod incmod #mkdir -m 775 -p $BASE/../../lib/include/ncep_post_${version}_4 make -f makefile_lib clean -mkdir -m 775 -p include/ncep_post_${version}_4 +mkdir -m 775 -p include/ncep_post_4 make -f makefile_lib exit 0 diff --git a/sorc/ncep_post.fd/makefile_lib b/sorc/ncep_post.fd/makefile_lib index 2af4ff0b6..185b53366 100644 --- a/sorc/ncep_post.fd/makefile_lib +++ b/sorc/ncep_post.fd/makefile_lib @@ -44,8 +44,8 @@ #POSTLIBPATH=../.. #TARGET = ${POSTLIBPATH}/lib/libncep_post_${version}_4.a #INCMOD= ${POSTLIBPATH}/lib/include/ncep_post_${version}_4 - TARGET = libncep_post_${version}_4.a - INCMOD = include/ncep_post_${version}_4 + TARGET = libncep_post_4.a + INCMOD = include/ncep_post_4 AR = ar ARFLAGS = -rv @@ -108,7 +108,7 @@ OBJS= VRBLS2D_mod.o VRBLS3D_mod.o VRBLS4D_mod.o MASKS_mod.o PMICRPH.o SOIL_mod.o CLDRAD.o CLMAX.o COLLECT.o COLLECT_LOC.o DEWPOINT.o \ FDLVL.o FGAMMA.o FIXED.o FRZLVL.o FRZLVL2.o \ GET_BITS.o GRIBIT.o LFMFLD.o \ - MAPSSLP.o MISCLN.o MIXLEN.o MDL2P.o MDLFLD.o \ + MAPSSLP.o MISCLN.o MDL2STD_P.o MIXLEN.o MDL2P.o MDLFLD.o \ NGMFLD.o NGMSLP.o OTLFT.o OTLIFT.o SLP_new.o SLP_NMM.o EXCH.o \ PARA_RANGE.o PROCESS.o EXCH2.o \ READCNTRL.o READ_xml.o SET_OUTFLDS.o SCLFLD.o \ @@ -122,7 +122,8 @@ OBJS= VRBLS2D_mod.o VRBLS3D_mod.o VRBLS4D_mod.o MASKS_mod.o PMICRPH.o SOIL_mod.o ICAOHEIGHT.o \ GEO_ZENITH_ANGLE.o GFIP3.o GRIDAVG.o CALUPDHEL.o \ AllGETHERV_GSD.o MSFPS.o SELECT_CHANNELS.o ALLOCATE_ALL.o \ - gtg_ctlblk.o gtg_indices.o gtg_filter.o gtg_compute.o gtg_config.o map_routines.o gtg_algo.o + gtg_ctlblk.o gtg_indices.o gtg_filter.o gtg_compute.o gtg_config.o map_routines.o gtg_algo.o gtg_smoothseams.o CALVESSEL.o \ + CALHEL2.o CALCAPE2.o .SUFFIXES: .F .f .o .f90 .c From 5f081ef85e990c7569d446b37f251d52a4bf3292 Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Thu, 19 Dec 2019 00:44:58 -0500 Subject: [PATCH 4/5] Post print (#37) * Remove unnessrary print outs in UPP code. * Reduce more print outs. --- sorc/ncep_post.fd/CALRAD_WCLOUD_newcrtm.f | 20 +++++++++--------- sorc/ncep_post.fd/CALWXT_BOURG.f | 8 ++++---- sorc/ncep_post.fd/INITPOST_GFS_NETCDF.f | 2 +- sorc/ncep_post.fd/INITPOST_NETCDF.f | 2 +- sorc/ncep_post.fd/MDLFLD.f | 4 ++-- sorc/ncep_post.fd/SURFCE.f | 4 ++-- sorc/ncep_post.fd/grib2_module.f | 25 ++++++++++++++--------- 7 files changed, 35 insertions(+), 30 deletions(-) diff --git a/sorc/ncep_post.fd/CALRAD_WCLOUD_newcrtm.f b/sorc/ncep_post.fd/CALRAD_WCLOUD_newcrtm.f index 8623d144b..0e24cdb05 100644 --- a/sorc/ncep_post.fd/CALRAD_WCLOUD_newcrtm.f +++ b/sorc/ncep_post.fd/CALRAD_WCLOUD_newcrtm.f @@ -358,19 +358,19 @@ SUBROUTINE CALRAD_WCLOUD czen(i,j)=cos(sun_zenith_rad) end do end do - if(jj>=jsta .and. jj<=jend) & + if(jj>=jsta .and. jj<=jend.and.debugprint) & print*,'sample GFS zenith angle=',acos(czen(ii,jj))*rtd ! end if ! Initialize CRTM. Load satellite sensor array. ! The optional arguments Process_ID and Output_Process_ID limit ! generation of runtime informative output to mpi task ! Output_Process_ID (which here is set to be task 0) - print*,'success in CALRAD= ',success + if(me==0)print*,'success in CALRAD= ',success allocate( channelinfo(n_sensors)) error_status = crtm_init(sensorlist_local,channelinfo, & Process_ID=0,Output_Process_ID=0 ) - print*, 'channelinfo after init= ',channelinfo(1)%sensor_id, & + if(me==0)print*, 'channelinfo after init= ',channelinfo(1)%sensor_id, & channelinfo(2)%sensor_id if (error_status /= 0_i_kind) & write(6,*)'ERROR*** crtm_init error_status=',error_status @@ -477,7 +477,7 @@ SUBROUTINE CALRAD_WCLOUD ! Loop over data types to process sensordo: do isat=1,n_sensors - print*,'n_sensor,obstype,isis',isat,obslist(isat),sensorlist(isat) + if(me==0)print*,'n_sensor,obstype,isis',isat,obslist(isat),sensorlist(isat) obstype=obslist(isat) isis=trim(sensorlist(isat)) @@ -510,7 +510,7 @@ SUBROUTINE CALRAD_WCLOUD (isis=='abi_g17' .and. post_abig17) .OR. & (isis=='abi_gr' .and. post_abigr) .OR. & (isis=='seviri_m10' .and. iget(876)>0) )then - print*,'obstype, isis= ',obstype,isis + if(me==0)print*,'obstype, isis= ',obstype,isis ! isis='amsua_n15' ! Initialize logical flags for satellite platform @@ -680,7 +680,7 @@ SUBROUTINE CALRAD_WCLOUD .and. geometryinfo(1)%sensor_zenith_angle >= 0.0_r_kind)THEN geometryinfo(1)%source_zenith_angle = acos(czen(i,j))*rtd ! solar zenith angle geometryinfo(1)%sensor_scan_angle = 0. ! scan angle, assuming nadir - if(i==ii.and.j==jj)print*,'sample geometry ', & + if(i==ii.and.j==jj.and.debugprint)print*,'sample geometry ', & geometryinfo(1)%sensor_zenith_angle & ,geometryinfo(1)%source_zenith_angle & ,czen(i,j)*rtd @@ -705,7 +705,7 @@ SUBROUTINE CALRAD_WCLOUD else snoeqv=0. end if - if(i==ii.and.j==jj)print*,'sno,itype,ivgtyp B cing snfrc = ', & + if(i==ii.and.j==jj.and.debugprint)print*,'sno,itype,ivgtyp B cing snfrc = ', & snoeqv,itype,IVGTYP(I,J) if(sm(i,j) > 0.1)then sfcpct(4)=0. @@ -869,7 +869,7 @@ SUBROUTINE CALRAD_WCLOUD if(surface(1)%snow_depth<0. .or. surface(1)%snow_depth>10000.) & print*,'bad snow_depth' end if - if(i==ii.and.j==jj)print*,'sample surface in CALRAD=', & + if(i==ii.and.j==jj.and.debugprint)print*,'sample surface in CALRAD=', & i,j,surface(1)%wind_speed,surface(1)%water_coverage, & surface(1)%land_coverage,surface(1)%ice_coverage, & surface(1)%snow_coverage,surface(1)%land_temperature, & @@ -882,7 +882,7 @@ SUBROUTINE CALRAD_WCLOUD ! Load atmosphere profiles into RTM model layers ! CRTM counts from top down just as post does - if(i==ii.and.j==jj)print*,'TOA= ',atmosphere(1)%level_pressure(0) + if(i==ii.and.j==jj.and.debugprint)print*,'TOA= ',atmosphere(1)%level_pressure(0) do k = 1,lm atmosphere(1)%level_pressure(k) = pint(i,j,k+1)/r100 atmosphere(1)%pressure(k) = pmid(i,j,k)/r100 @@ -910,7 +910,7 @@ SUBROUTINE CALRAD_WCLOUD ! & atmosphere(1)%absorber(k,1)>1.) & ! & print*,'bad atmosphere o3' end if - if(i==ii.and.j==jj)print*,'sample atmosphere in CALRAD=', & + if(i==ii.and.j==jj.and.debugprint)print*,'sample atmosphere in CALRAD=', & i,j,k,atmosphere(1)%level_pressure(k),atmosphere(1)%pressure(k), & atmosphere(1)%temperature(k),atmosphere(1)%absorber(k,1), & atmosphere(1)%absorber(k,2) diff --git a/sorc/ncep_post.fd/CALWXT_BOURG.f b/sorc/ncep_post.fd/CALWXT_BOURG.f index 8406f3f08..63f97b1b7 100644 --- a/sorc/ncep_post.fd/CALWXT_BOURG.f +++ b/sorc/ncep_post.fd/CALWXT_BOURG.f @@ -88,8 +88,8 @@ subroutine calwxt_bourg_post(im,jm,jsta_2l,jend_2u,jsta,jend,lm,lp1, & ! initialize weather type array to zero (ie, off). ! we do this since we want ptype to represent the ! instantaneous weather type on return. - print *,'in calwxtbg, jsta,jend=',jsta,jend,' im=',im - print *,'in calwxtbg,me=',me,'iseed=',iseed +! print *,'in calwxtbg, jsta,jend=',jsta,jend,' im=',im +! print *,'in calwxtbg,me=',me,'iseed=',iseed ! !$omp parallel do do j=jsta,jend @@ -106,10 +106,10 @@ subroutine calwxt_bourg_post(im,jm,jsta_2l,jend_2u,jsta,jend,lm,lp1, & !!$omp parallel do & ! & private(a,lmhk,tlmhk,iwrml,psfck,lhiwrm,pintk1,pintk2,area1, & ! & areape,dzkl,surfw,r1,r2) - print *,'incalwxtbg, rn',maxval(rn),minval(rn) +! print *,'incalwxtbg, rn',maxval(rn),minval(rn) do j=jsta,jend - if(me==1)print *,'incalwxtbg, j=',j +! if(me==1)print *,'incalwxtbg, j=',j do i=1,im lmhk = min(nint(lmh(i,j)),lm) psfck = pint(i,j,lmhk+1) diff --git a/sorc/ncep_post.fd/INITPOST_GFS_NETCDF.f b/sorc/ncep_post.fd/INITPOST_GFS_NETCDF.f index 17dd1651c..209ad87d5 100644 --- a/sorc/ncep_post.fd/INITPOST_GFS_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_GFS_NETCDF.f @@ -121,7 +121,7 @@ SUBROUTINE INITPOST_GFS_NETCDF(ncid3d) ! INTEGERS - THIS IS OK AS LONG AS INTEGERS AND REALS ARE THE SAME SIZE. LOGICAL RUNB,SINGLRST,SUBPOST,NEST,HYDRO,IOOMG,IOALL ! logical, parameter :: debugprint = .true., zerout = .false. - logical, parameter :: debugprint = .true., zerout = .false. + logical, parameter :: debugprint = .false., zerout = .false. logical :: convert_rad_to_deg=.false. CHARACTER*32 varcharval ! CHARACTER*40 CONTRL,FILALL,FILMST,FILTMP,FILTKE,FILUNV,FILCLD,FILRAD,FILSFC diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 1a96c5af1..7564dca82 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -120,7 +120,7 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) ! ALSO, EXTRACT IS CALLED WITH DUMMY ( A REAL ) EVEN WHEN THE NUMBERS ARE ! INTEGERS - THIS IS OK AS LONG AS INTEGERS AND REALS ARE THE SAME SIZE. LOGICAL RUNB,SINGLRST,SUBPOST,NEST,HYDRO,IOOMG,IOALL - logical, parameter :: debugprint = .true., zerout = .false. + logical, parameter :: debugprint = .false., zerout = .false. ! logical, parameter :: debugprint = .true., zerout = .false. logical :: convert_rad_to_deg=.false. CHARACTER*32 varcharval diff --git a/sorc/ncep_post.fd/MDLFLD.f b/sorc/ncep_post.fd/MDLFLD.f index d730cdd91..fb8ff73b8 100644 --- a/sorc/ncep_post.fd/MDLFLD.f +++ b/sorc/ncep_post.fd/MDLFLD.f @@ -547,7 +547,7 @@ SUBROUTINE MDLFLD ENDDO ENDDO ELSE ! compute radar refl for other than NAM/Ferrier or GFS/Zhao microphysics - print*,'calculating radar ref for non-Ferrier/non-Zhao schemes' + if(me==0)print*,'calculating radar ref for non-Ferrier/non-Zhao schemes' ! Determine IICE FLAG IF(IMP_PHYSICS == 1 .OR. IMP_PHYSICS == 3)THEN IICE = 0 @@ -3854,7 +3854,7 @@ SUBROUTINE MDLFLD if(grib == 'grib2')then dxm=dxm/1000.0 endif - print *,'dxm=',dxm + if(me==0)print *,'dxm=',dxm NSMOOTH = nint(5.*(13500./dxm)) do j = jsta_2l, jend_2u do i = 1, im diff --git a/sorc/ncep_post.fd/SURFCE.f b/sorc/ncep_post.fd/SURFCE.f index d37fe024d..e8bd2a49f 100644 --- a/sorc/ncep_post.fd/SURFCE.f +++ b/sorc/ncep_post.fd/SURFCE.f @@ -3164,7 +3164,7 @@ SUBROUTINE SURFCE fld_info(cfld)%ifld=IAVBLFLD(IGET(087)) fld_info(cfld)%ntrange=1 fld_info(cfld)%tinvstat=IFHR-ID(18) - print*,'id(18),tinvstat in apcp= ',ID(18),fld_info(cfld)%tinvstat +! print*,'id(18),tinvstat in apcp= ',ID(18),fld_info(cfld)%tinvstat !$omp parallel do private(i,j,jj) do j=1,jend-jsta+1 jj = jsta+j-1 @@ -3235,7 +3235,7 @@ SUBROUTINE SURFCE fld_info(cfld)%ifld=IAVBLFLD(IGET(417)) fld_info(cfld)%ntrange=1 fld_info(cfld)%tinvstat=IFHR - print*,'tinvstat in cont bucket= ',fld_info(cfld)%tinvstat +! print*,'tinvstat in cont bucket= ',fld_info(cfld)%tinvstat !$omp parallel do private(i,j,jj) do j=1,jend-jsta+1 jj = jsta+j-1 diff --git a/sorc/ncep_post.fd/grib2_module.f b/sorc/ncep_post.fd/grib2_module.f index 7d858ea13..134058ab0 100644 --- a/sorc/ncep_post.fd/grib2_module.f +++ b/sorc/ncep_post.fd/grib2_module.f @@ -220,6 +220,7 @@ subroutine gribit2(post_fname) integer,allocatable :: grbmsglen(:) real,allocatable :: datafld(:,:) real,allocatable :: datafldtmp(:) + logical, parameter :: debugprint = .false. ! character(1) cgrib(max_bytes) ! @@ -398,10 +399,12 @@ subroutine gribit2(post_fname) itblinfo, & idisc, icatg, iparm, ierr) if(ierr==0) then - write(6,'(3(A,I4),A,A)') ' discipline ',idisc, & - ' category ',icatg, & - ' parameter ',iparm, & - ' for var ',trim(pset%param(nprm)%pname) + if(debugprint) then + write(6,'(3(A,I4),A,A)') ' discipline ',idisc, & + ' category ',icatg, & + ' parameter ',iparm, & + ' for var ',trim(pset%param(nprm)%pname) + endif ! !--- generate grib2 message --- ! @@ -410,8 +413,10 @@ subroutine gribit2(post_fname) cstart=cstart+clength ! else - print *,'WRONG, could not find ',trim(pset%param(nprm)%pname), & - " in WMO and NCEP table!" + if(debugprint) then + print *,'WRONG, could not find ',trim(pset%param(nprm)%pname), & + " in WMO and NCEP table!" + endif !!! call mpi_abort() endif ! @@ -900,12 +905,12 @@ subroutine gengrb2msg(idisc,icatg, iparm,nprm,nlvl,fldlvl1,fldlvl2,ntrange,tinvs call get_g2_sec5packingmethod(pset%packing_method,idrsnum,ierr) if(maxval(datafld1)==minval(datafld1))then idrsnum=0 - print*,' changing to simple packing for constant fields' +! print*,' changing to simple packing for constant fields' end if if(modelname=='RAPR') then if((abs(maxval(datafld1)-minval(datafld1)) < 1.1) .and. (datafld1(1) > 500.0))then idrsnum=0 - print*,' changing to simple packing for constant fields: max-min < 0.1' +! print*,' changing to simple packing for constant fields: max-min < 0.1' end if if(trim(pset%param(nprm)%shortname)=='UGRD_ON_SPEC_HGT_LVL_ABOVE_GRND_10m'.or.& @@ -916,7 +921,7 @@ subroutine gengrb2msg(idisc,icatg, iparm,nprm,nlvl,fldlvl1,fldlvl2,ntrange,tinvs trim(pset%param(nprm)%shortname)=='VUCSH_ON_SPEC_HGT_LVL_ABOVE_GRND_0-6km'.or.& trim(pset%param(nprm)%shortname)=='VVCSH_ON_SPEC_HGT_LVL_ABOVE_GRND_0-6km')then idrsnum=0 - print*,' changing to simple packing for field: ',trim(pset%param(nprm)%shortname) +! print*,' changing to simple packing for field: ',trim(pset%param(nprm)%shortname) endif endif @@ -1220,7 +1225,7 @@ subroutine getgds(ldfgrd,len3,ifield3len,igds,ifield3) integer(4),intent(out) :: ifield3len integer(4),intent(inout) :: ifield3(len3),igds(5) - print *,'in getgds, im=',im,'jm=',jm,'latstart=',latstart,'lonsstart=',lonstart,'maptyp=',maptype +! print *,'in getgds, im=',im,'jm=',jm,'latstart=',latstart,'lonsstart=',lonstart,'maptyp=',maptype ! !** set up igds igds(1) = 0 !Source of grid definition (see Code Table 3.0) From 4c247c83eee1d5e4084f0a0a3645a13956ae0032 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Wed, 8 Jan 2020 17:13:22 +0000 Subject: [PATCH 5/5] update for jet; update for new write component coordinates --- modulefiles/post/v8.0.0-jet | 42 ++++++++++++++++------------- parm/hafs.xml | 2 +- parm/postxconfig-NT-hafs.txt | 2 +- sorc/ncep_post.fd/INITPOST_NETCDF.f | 36 +++++++++++++++++++++---- 4 files changed, 56 insertions(+), 26 deletions(-) diff --git a/modulefiles/post/v8.0.0-jet b/modulefiles/post/v8.0.0-jet index 982bc834f..5cc5341c7 100644 --- a/modulefiles/post/v8.0.0-jet +++ b/modulefiles/post/v8.0.0-jet @@ -22,46 +22,50 @@ module load impi module use /contrib/modulefiles # Loding nceplibs modules -module use -a /mnt/lfs3/projects/hfv3gfs/nwprod/lib/modulefiles -module load sigio/v2.0.1 +#module use -a /mnt/lfs3/projects/hfv3gfs/nwprod/lib/modulefiles +module use -a /mnt/lfs3/projects/hfv3gfs/nwprod/NCEPLIBS/modulefiles +module load sigio/v2.1.0 module load jasper/v1.900.1 module load png/v1.2.44 module load z/v1.2.6 module load sfcio/v1.0.0 -module load nemsio/v2.2.2 -module load bacio/v2.0.1 +module load nemsio/v2.2.3 +module load bacio/v2.0.2 #module load g2/v2.5.2 module load xmlparse/v2.0.0 module load gfsio/v1.1.0 -module load ip/v3.0.0 +module load ip/v3.0.1 module load sp/v2.0.2 -module load w3emc/v2.2.0 +module load w3emc/v2.3.0 module load w3nco/v2.0.6 -module load crtm/v2.2.3 +module load crtm/v2.2.6 +module load g2/v3.1.0 +module load g2tmpl/v1.6.0 +module load wrfio/v1.1.1 #module load netcdf/3.6.3 module load netcdf/4.6.1 -setenv NCEPLIBS /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib +#setenv NCEPLIBS /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib -module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/modulefiles -module load g2tmpl-intel/1.5.0 +#module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/modulefiles +#module load g2tmpl-intel/1.5.0 #module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/modulefiles #module load wrf-io-v1.1.1 # -setenv WRFIO_LIB /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/v1.1.1/lib/wrf_io/libwrfio_nf.a +#setenv WRFIO_LIB /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/v1.1.1/lib/wrf_io/libwrfio_nf.a -set dlib /mnt/lfs3/projects/hfv3gfs/gwv/ltmp2/lib/g2/v3.1.0/ -set bname "G2" +#set dlib /mnt/lfs3/projects/hfv3gfs/gwv/ltmp2/lib/g2/v3.1.0/ +#set bname "G2" # ### Export environment variables -setenv ${bname}_SRC $dlib/src -setenv ${bname}_INC4 $dlib/intel/include/g2_v3.1.0_4 -setenv ${bname}_INCd $dlib/intel/include/g2_v3.1.0_d -setenv ${bname}_LIB4 $dlib/intel/libg2_v3.1.0_4.a -setenv ${bname}_LIBd $dlib/intel/libg2_v3.1.0_d.a -setenv ${bname}_VER v3.1.0 +#setenv ${bname}_SRC $dlib/src +#setenv ${bname}_INC4 $dlib/intel/include/g2_v3.1.0_4 +#setenv ${bname}_INCd $dlib/intel/include/g2_v3.1.0_d +#setenv ${bname}_LIB4 $dlib/intel/libg2_v3.1.0_4.a +#setenv ${bname}_LIBd $dlib/intel/libg2_v3.1.0_d.a +#setenv ${bname}_VER v3.1.0 #setenv WRFPATH /mnt/lfs3/projects/hfv3gfs/nwprod/wrf_shared.v1.1.0/ setenv myFC mpiifort diff --git a/parm/hafs.xml b/parm/hafs.xml index 3c24b63c2..47986ed21 100755 --- a/parm/hafs.xml +++ b/parm/hafs.xml @@ -13,7 +13,7 @@ fcst hour nws_ncep - hur_hafs + hur_weather_res_and_fcst complex_packing_spatial_diff 2nd_ord_sptdiff fltng_pnt diff --git a/parm/postxconfig-NT-hafs.txt b/parm/postxconfig-NT-hafs.txt index a0359f4c0..d378fe543 100644 --- a/parm/postxconfig-NT-hafs.txt +++ b/parm/postxconfig-NT-hafs.txt @@ -11,7 +11,7 @@ fcst fcst hour nws_ncep -hur_hafs +hur_weather_res_and_fcst complex_packing_spatial_diff 2nd_ord_sptdiff fltng_pnt diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 7564dca82..633967713 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -113,6 +113,7 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) integer :: Status, fldsize, fldst, recn, recn_vvel character startdate*19,SysDepInfo*80,cgar*1 character startdate2(19)*4 + logical :: read_lonlat=.true. ! ! NOTE: SOME INTEGER VARIABLES ARE READ INTO DUMMY ( A REAL ). THIS IS OK ! AS LONG AS REALS AND INTEGERS ARE THE SAME SIZE. @@ -518,10 +519,28 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) end if 101 format(T13,i4,1x,i2,1x,i2,1x,i2,1x,i2) print*,'idate= ',idate(1:5) -! get longitude + +! Jili Dong check output format for coordinate reading Status=nf90_inq_varid(ncid3d,'grid_xt',varid) Status=nf90_inquire_variable(ncid3d,varid,ndims = numDims) - if(debugprint)print*,'number of dim for gdlon ',numDims + if(numDims==1) then + read_lonlat=.true. + else + read_lonlat=.false. + end if + + +! Jili Dong add support for new write component output +! get longitude + if (read_lonlat) then + Status=nf90_inq_varid(ncid3d,'lon',varid) + Status=nf90_inquire_variable(ncid3d,varid,ndims = numDims) + if(debugprint)print*,'number of dim for gdlon ',numDims + else + Status=nf90_inq_varid(ncid3d,'grid_xt',varid) + Status=nf90_inquire_variable(ncid3d,varid,ndims = numDims) + if(debugprint)print*,'number of dim for gdlon ',numDims + end if if(numDims==1)then Status=nf90_get_var(ncid3d,varid,glon1d) do j=jsta,jend @@ -580,10 +599,17 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) end if print*,'lonstart,lonlast ',lonstart,lonlast +! Jili Dong add support for new write component output ! get latitude - Status=nf90_inq_varid(ncid3d,'grid_yt',varid) - Status=nf90_inquire_variable(ncid3d,varid,ndims = numDims) - if(debugprint)print*,'number of dim for gdlat ',numDims + if (read_lonlat) then + Status=nf90_inq_varid(ncid3d,'lat',varid) + Status=nf90_inquire_variable(ncid3d,varid,ndims = numDims) + if(debugprint)print*,'number of dim for gdlat ',numDims + else + Status=nf90_inq_varid(ncid3d,'grid_yt',varid) + Status=nf90_inquire_variable(ncid3d,varid,ndims = numDims) + if(debugprint)print*,'number of dim for gdlat ',numDims + end if if(numDims==1)then Status=nf90_get_var(ncid3d,varid,glat1d) do j=jsta,jend