From 4c247c83eee1d5e4084f0a0a3645a13956ae0032 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Wed, 8 Jan 2020 17:13:22 +0000 Subject: [PATCH] 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