Commit 60857765 authored by Knut's avatar Knut

Merge branch 'fwf_int' into grid_type

parents be998b32 3eb2636e
......@@ -133,26 +133,6 @@
call open_meteo_file(meteo_file)
if(iextr .eq. 1 .and. jextr .eq. 1) then
point_source = .true.
LEVEL3 'Assuming Point Source meteo forcing'
! if (on_grid .eq. .false. ) then
LEVEL3 'Setting on_grid to true'
on_grid=.true.
! end if
end if
if (met_lat(1) .gt. met_lat(2)) then
LEVEL3 'Reverting lat-axis and setting grid_scan to 0'
grid_scan = 0
x = met_lat(1)
do j=1,jextr/2
met_lat(j) = met_lat(jextr-j+1)
met_lat(jextr-j+1) = x
x = met_lat(j+1)
end do
end if
allocate(wrk(iextr,jextr),stat=err)
if (err /= 0) stop 'ncdf_meteo: Error allocating memory (wrk)'
wrk = 0.
......@@ -179,6 +159,17 @@
call to_rotated_lat_lon(southpole,olon,olat,rlon,rlat,x)
beta = x
end if
else
if (met_lat(1) .gt. met_lat(2)) then
LEVEL3 'Reverting lat-axis and setting grid_scan to 0'
grid_scan = 0
x = met_lat(1)
do j=1,jextr/2
met_lat(j) = met_lat(jextr-j+1)
met_lat(jextr-j+1) = x
x = met_lat(j+1)
end do
end if
end if
if ( .not. on_grid ) then
......
......@@ -16,8 +16,7 @@
! !USES:
use netcdf
use ncdf_restart
use domain, only: grid_type
use domain, only: xc,yc,lonc,latc
use domain, only: xcord,ycord
use domain, only: imin,imax,jmin,jmax,kmax
use variables_2d
#ifndef NO_3D
......@@ -78,18 +77,11 @@
#endif
start(3) = 1; edges(3) = kmax+1
select case (grid_type)
case (1) ! cartesian
status = nf90_put_var(ncid,xax_id,xc(_IRANGE_,1))
if (status .NE. NF90_NOERR) go to 10
status = nf90_put_var(ncid,yax_id,yc(1,_JRANGE_))
if (status .NE. NF90_NOERR) go to 10
case (2) ! spherical
status = nf90_put_var(ncid,xax_id,lonc(_IRANGE_,1))
if (status .NE. NF90_NOERR) go to 10
status = nf90_put_var(ncid,yax_id,latc(1,_JRANGE_))
if (status .NE. NF90_NOERR) go to 10
end select
status = nf90_put_var(ncid,xax_id,xcord(_IRANGE_))
if (status .NE. NF90_NOERR) go to 10
status = nf90_put_var(ncid,yax_id,ycord(_JRANGE_))
if (status .NE. NF90_NOERR) go to 10
status = nf90_put_var(ncid,zax_id,zax(0:kmax))
if (status .NE. NF90_NOERR) go to 10
......
Markdown is supported
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