Skip to content

Commit

Permalink
update for jet; update for new write component coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
JiliDong-NOAA committed Jan 8, 2020
1 parent 2a7c595 commit 4c247c8
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 26 deletions.
42 changes: 23 additions & 19 deletions modulefiles/post/v8.0.0-jet
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion parm/hafs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<gen_proc_type>fcst</gen_proc_type>
<time_range_unit>hour</time_range_unit>
<orig_center>nws_ncep</orig_center>
<gen_proc>hur_hafs</gen_proc>
<gen_proc>hur_weather_res_and_fcst</gen_proc>
<packing_method>complex_packing_spatial_diff</packing_method>
<order_of_sptdiff>2nd_ord_sptdiff</order_of_sptdiff>
<field_datatype>fltng_pnt</field_datatype>
Expand Down
2 changes: 1 addition & 1 deletion parm/postxconfig-NT-hafs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 31 additions & 5 deletions sorc/ncep_post.fd/INITPOST_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4c247c8

Please sign in to comment.