Commit ca2c1410 authored by dingwell's avatar dingwell
Browse files

Added projection paramters to flxout*.nc output

parent 1da43871
......@@ -218,29 +218,40 @@ subroutine write_ncinfo(itime,nesting_level)
endif
if (option_verbose.ge.10) write(*,10) 'map projection attributes'
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ_ID',map_proj_id)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ',map_proj_id)
call check_ncerror(ncret)
if (outgrid_option .eq. 1) then
if (outgrid_option .eq. 1) then ! native lon-lat grid.
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','Regular Latit/Longit')
call check_ncerror(ncret)
else
if (map_proj_id.eq.1) then
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','Lambert conformal')
else ! Using map projection, add projection info to output:
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'EARTH_RADIUS_M',earth_radius_m)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'CEN_LAT',proj_clat)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'CEN_LON',proj_clon)
call check_ncerror(ncret)
if (map_proj_id.eq.1) then ! Lamber conformal projection
!ncret = &
! NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','Lambert conformal')
!call check_ncerror(ncret)
! Attributes on WRF format:
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ_CHAR','Lambert Conformal')
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'STAND_LON',proj_stdlon)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'TRUELAT1',proj_truelat1)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'STAND_LON', proj_stdlon)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'TRUELAT2',proj_truelat2)
call check_ncerror(ncret)
!TODO
elseif (map_proj_id.eq.2) then
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','stereographic')
call check_ncerror(ncret)
elseif (map_proj_id.eq.3) then
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','mercator')
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ_CHAR','Mercator')
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'TRUELAT1',proj_truelat1)
call check_ncerror(ncret)
elseif (map_proj_id.eq.4) then
ncret = &
......
......@@ -226,29 +226,40 @@ subroutine write_ncinfo(itime,nesting_level)
endif
if (option_verbose.ge.10) write(*,10) 'map projection attributes'
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ_ID',map_proj_id)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ',map_proj_id)
call check_ncerror(ncret)
if (outgrid_option .eq. 1) then
if (outgrid_option .eq. 1) then ! native lon-lat grid.
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','Regular Latit/Longit')
call check_ncerror(ncret)
else
if (map_proj_id.eq.1) then
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','Lambert conformal')
else ! Using map projection, add projection info to output:
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'EARTH_RADIUS_M',earth_radius_m)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'CEN_LAT',proj_clat)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'CEN_LON',proj_clon)
call check_ncerror(ncret)
if (map_proj_id.eq.1) then ! Lamber conformal projection
!ncret = &
! NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','Lambert conformal')
!call check_ncerror(ncret)
! Attributes on WRF format:
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ_CHAR','Lambert Conformal')
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'STAND_LON',proj_stdlon)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'TRUELAT1',proj_truelat1)
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'STAND_LON', proj_stdlon)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'TRUELAT2',proj_truelat2)
call check_ncerror(ncret)
!TODO
elseif (map_proj_id.eq.2) then
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','stereographic')
call check_ncerror(ncret)
elseif (map_proj_id.eq.3) then
ncret = &
NF90_PUT_ATT(ncid,NF90_GLOBAL,'OUTPUT_PROJECTION','mercator')
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'MAP_PROJ_CHAR','Mercator')
call check_ncerror(ncret)
ncret = NF90_PUT_ATT(ncid,NF90_GLOBAL,'TRUELAT1',proj_truelat1)
call check_ncerror(ncret)
elseif (map_proj_id.eq.4) then
ncret = &
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment