Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
flexpart
flexpart-wrf
Commits
5b63ee2e
Commit
5b63ee2e
authored
Jun 05, 2015
by
dingwell
Browse files
Updated call to netcdf output subroutines
parent
7fd6c332
Changes
7
Hide whitespace changes
Inline
Side-by-side
concoutput_irreg.f90
View file @
5b63ee2e
...
...
@@ -376,7 +376,7 @@
if
(
option_verbose
.ge.
1
)
then
write
(
*
,
*
)
'concoutput_irreg: Calling write_ncconc for main outgrid'
endif
call
write_
ncconc
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
0
)
! 0= nest level
call
nc_
write_
oputput
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
0
)
! 0= nest level
else
! binary or ascii output
! Concentration output
...
...
concoutput_nest_irreg.f90
View file @
5b63ee2e
...
...
@@ -313,7 +313,7 @@ subroutine concoutput_nest_irreg(itime,outnum)
if
(
option_verbose
.ge.
1
)
then
write
(
*
,
*
)
'concoutput_nest_irreg: Calling write_ncconc for main outgrid'
endif
call
write_
ncconc
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
1
)
! 1= nest level
call
nc_
write_
oputput
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
1
)
! 1= nest level
else
! binary or ascii output
! Concentration output
...
...
concoutput_nest_reg.f90
View file @
5b63ee2e
...
...
@@ -309,7 +309,7 @@ subroutine concoutput_nest_reg(itime,outnum)
if
(
option_verbose
.ge.
1
)
then
write
(
*
,
*
)
'concoutput_nest_reg: Calling write_ncconc for main outgrid'
endif
call
write_
ncconc
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
1
)
! 1= nest level
call
nc_
write_
oputput
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
1
)
! 1= nest level
else
! binary or ascii output
! Concentration output
...
...
concoutput_reg.f90
View file @
5b63ee2e
...
...
@@ -392,7 +392,7 @@
if
(
option_verbose
.ge.
1
)
then
write
(
*
,
*
)
'concoutput_reg: Calling write_ncconc for main outgrid'
endif
call
write_
ncconc
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
0
)
! 0= nest level
call
nc_
write_
oputput
(
itime
,
outnum
,
ks
,
kp
,
nage
,
tot_mu
(
ks
,
kp
),
densityoutrecept
,
0
)
! 0= nest level
else
! binary or ascii output
! Concentration output
...
...
flexwrf.f90
View file @
5b63ee2e
...
...
@@ -53,6 +53,8 @@
! land-use data from WRF *
! 2015-05-27 A. Dingwell: Now reads roughness length when landuse is read *
! from WRF. *
! 2015-06-05 A. Dingwell: Added module netcdf_output_mod, updated calls *
! new/renamed subroutines. *
! *
!*******************************************************************************
! *
...
...
@@ -67,6 +69,7 @@
use
par_mod
use
com_mod
use
conv_mod
use
netcdf_output_mod
! Contains subroutines for netcdf output format
use
luxury
use
mt_stream
...
...
@@ -240,8 +243,8 @@
call
writeheader
if
(
nested_output
.eq.
1
)
call
writeheader_nest
()
!need to be fixed
else
! netcdf output
call
wri
te_
nc
header
(
0
,
0
)
if
(
nested_output
.eq.
1
)
call
wri
te_
nc
header
(
0
,
1
)
call
nc_crea
te_header
_outfile
(
0
,
0
)
if
(
nested_output
.eq.
1
)
call
nc_crea
te_header
_outfile
(
0
,
1
)
endif
!iouttype
! open(unitdates,file=path(2)(1:length(2))//'dates')
open
(
unitdates
,
file
=
path
(
1
)(
1
:
length
(
1
))//
'dates'
)
...
...
flexwrf_mpi.f90
View file @
5b63ee2e
...
...
@@ -54,6 +54,8 @@
! land-use data from WRF *
! 2015-05-27 A. Dingwell: Now reads roughness length when landuse is read *
! from WRF. *
! 2015-06-05 A. Dingwell: Added module netcdf_output_mod, updated calls *
! new/renamed subroutines. *
! *
!*******************************************************************************
! *
...
...
@@ -68,6 +70,7 @@
use
par_mod
use
com_mod
use
conv_mod
use
netcdf_output_mod
! Contains subroutines for netcdf output format
!-- modules below added by mc for parallel random generaiton using teh RANLUX
!and Mersenne-Twister generator
...
...
@@ -261,12 +264,8 @@
call
writeheader
if
(
nested_output
.eq.
1
)
call
writeheader_nest
()
!need to be fixed
else
! netcdf output
call
write_ncheader
(
0
,
0
)
if
(
nested_output
.eq.
1
)
call
write_ncheader
(
0
,
1
)
! if (nested_output.eq.1) then
! write(*,*) 'netcdf nested output not finished yet! aborting'
! stop
! endif
call
nc_create_header_outfile
(
0
,
0
)
if
(
nested_output
.eq.
1
)
call
nc_create_header_outfile
(
0
,
1
)
endif
!iouttype
! open(unitdates,file=path(2)(1:length(2))//'dates')
open
(
unitdates
,
file
=
path
(
1
)(
1
:
length
(
1
))//
'dates'
)
...
...
netcdf_output_mod.F90
View file @
5b63ee2e
...
...
@@ -204,7 +204,7 @@ module netcdf_output_mod
ncret
=
NF90_PUT_ATT
(
ncid
,
NF90_GLOBAL
,
'DY'
,
ncgrid_dy
)
call
check_ncerror
(
ncret
)
end
subroutine
write_
nc_
global_attributes
end
subroutine
nc_
write_global_attributes
subroutine
nc_create_main_outfile
(
itime
,
nesting_level
)
!*****************************************************************************
...
...
@@ -1569,18 +1569,12 @@ end subroutine nc_create_header_outfile
!***********************************************
if
(
ncirec
.eq.
1
)
then
! First output in current file?
! write(*,*) 'itime=',itime
if
((
ks
.eq.
1
)
.and.
(
kp
.eq.
1
)
.and.
(
nage
.eq.
1
))
then
! if (itime.ne.loutstep) then ! Not the first output file?
! ncret=nf_close(ncid) ! close the old file
! call check_ncerror(ncret)
! print*,'file is closed'
! endif
! call write_ncheader(itime,nesting_level) ! Create new file
if
(
option_verbose
.ge.
1
)
&
write
(
*
,
*
)
'write_ncconc: calling write_ncinfo'
call
write_ncinfo
(
itime
,
nesting_level
)
! Create new file
if
((
ks
.eq.
1
)
.and.
(
kp
.eq.
1
)
.and.
(
nage
.eq.
1
))
then
if
(
option_verbose
.ge.
1
)
&
write
(
*
,
*
)
'write_ncconc: calling write_ncinfo'
call
nc_create_main_outfile
(
itime
,
nesting_level
)
! Create new file
endif
! Reassign file handle to the newly created file:
endif
if
(
nesting_level
.eq.
0
)
ncid
=
ncout
if
(
nesting_level
.eq.
1
)
ncid
=
ncoutn
endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment