diff --git a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f index 1bfc8b7f5d..29ab5f09be 100644 --- a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f +++ b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f @@ -929,13 +929,14 @@ SUBROUTINE INITPOST_GFS_NEMS_MPIIO(iostatusAER) call getrecn(recname,reclevtyp,reclev,nrec,varname,VcoordName,l,recn) if(recn /= 0) then fldst = (recn-1)*fldsize +! make sure delz is positive. !$omp parallel do private(i,j,js) do j=jsta,jend js = fldst + (j-jsta)*im do i=1,im - zint(i,j,ll)=zint(i,j,ll+1)+tmp(i+js) + zint(i,j,ll)=zint(i,j,ll+1)+abs(tmp(i+js)) if(recn_dpres /= -9999)pmid(i,j,ll)=rgas*dpres(i,j,ll)* & - t(i,j,ll)*(q(i,j,ll)*fv+1.0)/grav/tmp(i+js) + t(i,j,ll)*(q(i,j,ll)*fv+1.0)/grav/abs(tmp(i+js)) enddo enddo if(debugprint)print*,'sample l ',VarName,' = ',ll, & @@ -945,7 +946,7 @@ SUBROUTINE INITPOST_GFS_NEMS_MPIIO(iostatusAER) do j=jsta,jend js = fldst + (j-jsta)*im do i=1,im - omga(i,j,ll)=(-1.)*wh(i,j,ll)*dpres(i,j,ll)/tmp(i+js) + omga(i,j,ll)=(-1.)*wh(i,j,ll)*dpres(i,j,ll)/abs(tmp(i+js)) end do end do if(debugprint)print*,'sample l omga for FV3',ll, & diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 783a4dd641..28595d7f43 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -702,16 +702,17 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) cwm(i,j,l)=spval ! zint(i,j,l)=zint(i,j,l+1)+buf(i,j) ! if(abs(dpres(i,j,l))>1.0e5)print*,'bad dpres ',i,j,dpres(i,j,l) +!make sure delz is positive if(dpres(i,j,l)/=spval .and. t(i,j,l)/=spval .and. & q(i,j,l)/=spval .and. buf3d(i,j,l)/=spval)then pmid(i,j,l)=rgas*dpres(i,j,l)* & - t(i,j,l)*(q(i,j,l)*fv+1.0)/grav/buf3d(i,j,l) + t(i,j,l)*(q(i,j,l)*fv+1.0)/grav/abs(buf3d(i,j,l)) else pmid(i,j,l)=spval end if ! dong add missing value if (wh(i,j,l) < spval) then - omga(i,j,l)=(-1.)*wh(i,j,l)*dpres(i,j,l)/buf3d(i,j,l) + omga(i,j,l)=(-1.)*wh(i,j,l)*dpres(i,j,l)/abs(buf3d(i,j,l)) else omga(i,j,l) = spval end if @@ -858,7 +859,8 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) do j=jsta,jend do i=1,im if(zint(i,j,l+1)/=spval .and. buf3d(i,j,l)/=spval)then - zint(i,j,l)=zint(i,j,l+1)+buf3d(i,j,l) +!make sure delz is positive + zint(i,j,l)=zint(i,j,l+1)+abs(buf3d(i,j,l)) ! if(zint(i,j,l)>1.0E6)print*,'bad H ',i,j,l,zint(i,j,l) else zint(i,j,l)=spval diff --git a/ush/fv3gfs_downstream_nems.sh b/ush/fv3gfs_downstream_nems.sh index 707f77a05b..4449c964c7 100755 --- a/ush/fv3gfs_downstream_nems.sh +++ b/ush/fv3gfs_downstream_nems.sh @@ -25,6 +25,8 @@ set -x #-Wen Meng, January 2018, add flag PGB1F for turning on/ogg grib1 pgb data at 1.00 deg. generation. #-Wen Meng, Feburary 2018 # 1. Add flag PGBS for turning on/off pgb data at 1.0 and 0.5 deg. generation frequency of FHOUT_PGB defined. +#-Wen Meng, October +# 1. Use bilinear interpolation for LAND. It can trancate land-sea mask as 1 or 0. #----------------------------------------------------------------------- @@ -47,7 +49,7 @@ export PGBS=${PGBS:-"NO"} #YES-- generate 1.00 and 0.50 deg pgb data #--wgrib2 regrid parameters export option1=' -set_grib_type same -new_grid_winds earth ' export option21=' -new_grid_interpolation bilinear -if ' -export option22=":(LAND|CRAIN|CICEP|CFRZR|CSNOW|ICSEV):" +export option22=":(CRAIN|CICEP|CFRZR|CSNOW|ICSEV):" export option23=' -new_grid_interpolation neighbor -fi ' export option24=' -set_bitmap 1 -set_grib_max_bits 16 -if ' export option25=":(APCP|ACPCP|PRATE|CPRAT):" diff --git a/ush/fv3gfs_dwn_nems.sh b/ush/fv3gfs_dwn_nems.sh index c7611e3453..133d62d886 100755 --- a/ush/fv3gfs_dwn_nems.sh +++ b/ush/fv3gfs_dwn_nems.sh @@ -9,6 +9,7 @@ set -x # Wen Meng 12/2017: add trim_rh.sh for triming RH values larger than 100. # Wen Meng 01/2018: add flag PGB1F for turning on/off wgrib1 pgb data at 1.00 deg. generation. # Wen Meng 02/2018: add flag PGBS for turning on/off pgb data at 1.0 and 0.5 deg. generation. +# Wen Meng 10/2019: Use bilinear interpolation for LAND, It can trancate land-sea mask as 0 or 1. export tmpfile=$1 export fhr3=$2 @@ -22,7 +23,7 @@ export TRIMRH=${TRIMRH:-$USHgfs/trim_rh.sh} export opt1=' -set_grib_type same -new_grid_winds earth ' export opt21=' -new_grid_interpolation bilinear -if ' -export opt22=":(LAND|CSNOW|CRAIN|CFRZR|CICEP|ICSEV):" +export opt22=":(CSNOW|CRAIN|CFRZR|CICEP|ICSEV):" export opt23=' -new_grid_interpolation neighbor -fi ' export opt24=' -set_bitmap 1 -set_grib_max_bits 16 -if ' export opt25=":(APCP|ACPCP|PRATE|CPRAT):"