Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added lambert conformal projection for FV3SAR and handled composite r… #14

Merged
merged 1 commit into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion sorc/ncep_post.fd/INITPOST_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ SUBROUTINE INITPOST_NETCDF(ncid3d)
nbin_oc, nbin_su, gocart_on, pt_tbl, hyb_sigp, filenameFlux, fileNameAER
use gridspec_mod, only: maptype, gridtype, latstart, latlast, lonstart, lonlast, cenlon, &
dxval, dyval, truelat2, truelat1, psmapf, cenlat,lonstartv, lonlastv, cenlonv, &
latstartv, latlastv, cenlatv,latstart_r,latlast_r,lonstart_r,lonlast_r
latstartv, latlastv, cenlatv,latstart_r,latlast_r,lonstart_r,lonlast_r, STANDLON
use rqstfld_mod, only: igds, avbl, iq, is
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
implicit none
Expand Down Expand Up @@ -353,6 +353,82 @@ SUBROUTINE INITPOST_NETCDF(ncid3d)

! Jili Dong add support for regular lat lon (2019/03/22) end

ELSE IF (trim(varcharval)=='lambert_conformal')then

MAPTYPE=1
idrt=1
Status=nf90_get_att(ncid3d,nf90_global,'cen_lon',dum_const)
if(Status/=0)then
print*,'cen_lon not found; assigning missing value'
cenlon=spval
else
if(dum_const<0.)then
cenlon=nint((dum_const+360.)*gdsdegr)
else
cenlon=dum_const*gdsdegr
end if
end if
Status=nf90_get_att(ncid3d,nf90_global,'cen_lat',dum_const)
if(Status/=0)then
print*,'cen_lat not found; assigning missing value'
cenlat=spval
else
cenlat=dum_const*gdsdegr
end if

Status=nf90_get_att(ncid3d,nf90_global,'lon1',dum_const)
if(Status/=0)then
print*,'lonstart not found; assigning missing value'
lonstart=spval
else
if(dum_const<0.)then
lonstart=nint((dum_const+360.)*gdsdegr)
else
lonstart=dum_const*gdsdegr
end if
end if
Status=nf90_get_att(ncid3d,nf90_global,'lat1',dum_const)
if(Status/=0)then
print*,'latstart not found; assigning missing value'
latstart=spval
else
latstart=dum_const*gdsdegr
end if

Status=nf90_get_att(ncid3d,nf90_global,'stdlat1',dum_const)
if(Status/=0)then
print*,'stdlat1 not found; assigning missing value'
truelat1=spval
else
truelat1=dum_const*gdsdegr
end if
Status=nf90_get_att(ncid3d,nf90_global,'stdlat2',dum_const)
if(Status/=0)then
print*,'stdlat2 not found; assigning missing value'
truelat2=spval
else
truelat2=dum_const*gdsdegr
end if

Status=nf90_get_att(ncid3d,nf90_global,'dx',dum_const)
if(Status/=0)then
print*,'dx not found; assigning missing value'
dxval=spval
else
dxval=dum_const*1.E3
end if
Status=nf90_get_att(ncid3d,nf90_global,'dy',dum_const)
if(Status/=0)then
print*,'dphd not found; assigning missing value'
dyval=spval
else
dyval=dum_const*1.E3
end if

STANDLON = cenlon
print*,'lonstart,latstart,cenlon,cenlat,truelat1,truelat2,stadlon,dyval,dxval', &
lonstart,latstart,cenlon,cenlat,truelat1,truelat2,standlon,dyval,dxval

else ! setting default maptype
MAPTYPE=0
idrt=0
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/MDLFLD.f
Original file line number Diff line number Diff line change
Expand Up @@ -2876,7 +2876,7 @@ SUBROUTINE MDLFLD
IF(IMP_PHYSICS == 8 .or. IMP_PHYSICS == 28) THEN
!NMMB does not have composite radar ref in model output
IF(MODELNAME=='NMM' .and. gridtype=='B' .or. &
MODELNAME=='NCAR'.or. &
MODELNAME=='NCAR'.or. MODELNAME=='FV3R' .or. &
MODELNAME=='NMM' .and. gridtype=='E')THEN
!$omp parallel do private(i,j,l)
DO J=JSTA,JEND
Expand Down