Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Méso-NH code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RODIER Quentin
Méso-NH code
Commits
c014d077
Commit
c014d077
authored
4 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 14/01/2021: budgets: write X and Y coordinates for flyers
parent
78d07c87
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/MNH/write_aircraft_balloon.f90
+10
-8
10 additions, 8 deletions
src/MNH/write_aircraft_balloon.f90
src/MNH/write_diachro.f90
+57
-21
57 additions, 21 deletions
src/MNH/write_diachro.f90
with
67 additions
and
29 deletions
src/MNH/write_aircraft_balloon.f90
+
10
−
8
View file @
c014d077
!MNH_LIC Copyright 2000-202
0
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 2000-202
1
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
!MNH_LIC for details. version 1.
...
@@ -861,9 +861,10 @@ tzfields(:)%ndimlist(4) = NMNHDIM_FLYER_TIME
...
@@ -861,9 +861,10 @@ tzfields(:)%ndimlist(4) = NMNHDIM_FLYER_TIME
tzfields
(:)
%
ndimlist
(
5
)
=
NMNHDIM_UNUSED
tzfields
(:)
%
ndimlist
(
5
)
=
NMNHDIM_UNUSED
tzfields
(:)
%
ndimlist
(
6
)
=
NMNHDIM_FLYER_PROC
tzfields
(:)
%
ndimlist
(
6
)
=
NMNHDIM_FLYER_PROC
call
Write_diachro
(
tpdiafile
,
tzfields
,
ygroup
,
"RSPL"
,
tpflyer
%
tpdates
,
&
call
Write_diachro
(
tpdiafile
,
tzfields
,
ygroup
,
"RSPL"
,
tpflyer
%
tpdates
,
&
zw6
,
&
zw6
,
&
ptrajx
=
ztrajx
,
ptrajy
=
ztrajy
,
ptrajz
=
ztrajz
)
ptrajx
=
ztrajx
,
ptrajy
=
ztrajy
,
ptrajz
=
ztrajz
,
&
tpflyer
=
tpflyer
)
deallocate
(
tzfields
)
deallocate
(
tzfields
)
...
@@ -884,10 +885,11 @@ tzfields(:)%ndimlist(4) = NMNHDIM_FLYER_TIME
...
@@ -884,10 +885,11 @@ tzfields(:)%ndimlist(4) = NMNHDIM_FLYER_TIME
tzfields
(:)
%
ndimlist
(
5
)
=
NMNHDIM_UNUSED
tzfields
(:)
%
ndimlist
(
5
)
=
NMNHDIM_UNUSED
tzfields
(:)
%
ndimlist
(
6
)
=
NMNHDIM_FLYER_PROC
tzfields
(:)
%
ndimlist
(
6
)
=
NMNHDIM_FLYER_PROC
call
Write_diachro
(
tpdiafile
,
tzfields
,
ygroupz
,
"CART"
,
tpflyer
%
tpdates
,
&
call
Write_diachro
(
tpdiafile
,
tzfields
,
ygroupz
,
"CART"
,
tpflyer
%
tpdates
,
&
zwz6
,
&
zwz6
,
&
oicp
=
.true.
,
ojcp
=
.true.
,
okcp
=
.false.
,
&
oicp
=
.true.
,
ojcp
=
.true.
,
okcp
=
.false.
,
&
kil
=
1
,
kih
=
1
,
kjl
=
1
,
kjh
=
1
,
kkl
=
1
,
kkh
=
iku
)
kil
=
1
,
kih
=
1
,
kjl
=
1
,
kjh
=
1
,
kkl
=
1
,
kkh
=
iku
,
&
tpflyer
=
tpflyer
)
deallocate
(
tzfields
)
deallocate
(
tzfields
)
...
...
This diff is collapsed.
Click to expand it.
src/MNH/write_diachro.f90
+
57
−
21
View file @
c014d077
...
@@ -15,12 +15,12 @@ public :: Write_diachro
...
@@ -15,12 +15,12 @@ public :: Write_diachro
contains
contains
! #########################################################################
! #########################################################################
##
subroutine
Write_diachro
(
tpdiafile
,
tpfields
,
hgroup
,
htype
,
&
subroutine
Write_diachro
(
tpdiafile
,
tpfields
,
hgroup
,
htype
,
&
tpdates
,
pvar
,
&
tpdates
,
pvar
,
&
oicp
,
ojcp
,
okcp
,
kil
,
kih
,
kjl
,
kjh
,
kkl
,
kkh
,
&
oicp
,
ojcp
,
okcp
,
kil
,
kih
,
kjl
,
kjh
,
kkl
,
kkh
,
&
ptrajx
,
ptrajy
,
ptrajz
,
osplit
)
ptrajx
,
ptrajy
,
ptrajz
,
osplit
,
tpflyer
)
! #########################################################################
! #########################################################################
##
!
!
!!**** *WRITE_DIACHRO* - Ecriture d'un enregistrement dans un fichier
!!**** *WRITE_DIACHRO* - Ecriture d'un enregistrement dans un fichier
!! diachronique (de nom de base HGROUP)
!! diachronique (de nom de base HGROUP)
...
@@ -90,10 +90,11 @@ subroutine Write_diachro( tpdiafile, tpfields, hgroup, htype, &
...
@@ -90,10 +90,11 @@ subroutine Write_diachro( tpdiafile, tpfields, hgroup, htype, &
!* 0. DECLARATIONS
!* 0. DECLARATIONS
! ------------
! ------------
!
!
use
modd_conf
,
only
:
lpack
use
modd_aircraft_balloon
,
only
:
flyer
use
modd_field
,
only
:
tfield_metadata_base
use
modd_conf
,
only
:
lpack
use
modd_io
,
only
:
tfiledata
use
modd_field
,
only
:
tfield_metadata_base
use
modd_type_date
,
only
:
date_time
use
modd_io
,
only
:
tfiledata
use
modd_type_date
,
only
:
date_time
!
!
IMPLICIT
NONE
IMPLICIT
NONE
!
!
...
@@ -112,6 +113,7 @@ REAL,DIMENSION(:,:,:), INTENT(IN), OPTIONAL :: PTR
...
@@ -112,6 +113,7 @@ REAL,DIMENSION(:,:,:), INTENT(IN), OPTIONAL :: PTR
REAL
,
DIMENSION
(:,:,:),
INTENT
(
IN
),
OPTIONAL
::
PTRAJY
REAL
,
DIMENSION
(:,:,:),
INTENT
(
IN
),
OPTIONAL
::
PTRAJY
REAL
,
DIMENSION
(:,:,:),
INTENT
(
IN
),
OPTIONAL
::
PTRAJZ
REAL
,
DIMENSION
(:,:,:),
INTENT
(
IN
),
OPTIONAL
::
PTRAJZ
logical
,
intent
(
in
),
optional
::
osplit
logical
,
intent
(
in
),
optional
::
osplit
type
(
flyer
),
intent
(
in
),
optional
::
tpflyer
!
!
!* 0.1 Local variables
!* 0.1 Local variables
! ---------------
! ---------------
...
@@ -151,7 +153,7 @@ if ( tpdiafile%cformat == 'LFI' .or. tpdiafile%cformat == 'LFICDF4' ) &
...
@@ -151,7 +153,7 @@ if ( tpdiafile%cformat == 'LFI' .or. tpdiafile%cformat == 'LFICDF4' ) &
#ifdef MNH_IOCDF4
#ifdef MNH_IOCDF4
if
(
tpdiafile
%
cformat
==
'NETCDF4'
.or.
tpdiafile
%
cformat
==
'LFICDF4'
)
&
if
(
tpdiafile
%
cformat
==
'NETCDF4'
.or.
tpdiafile
%
cformat
==
'LFICDF4'
)
&
call
Write_diachro_nc4
(
tpdiafile
,
tpfields
,
hgroup
,
htype
,
tpdates
,
pvar
,
gicp
,
gjcp
,
gkcp
,
kil
,
kih
,
kjl
,
kjh
,
kkl
,
kkh
,
&
call
Write_diachro_nc4
(
tpdiafile
,
tpfields
,
hgroup
,
htype
,
tpdates
,
pvar
,
gicp
,
gjcp
,
gkcp
,
kil
,
kih
,
kjl
,
kjh
,
kkl
,
kkh
,
&
osplit
)
osplit
,
tpflyer
)
#endif
#endif
lpack
=
gpack
lpack
=
gpack
...
@@ -624,21 +626,23 @@ end subroutine Write_diachro_lfi
...
@@ -624,21 +626,23 @@ end subroutine Write_diachro_lfi
#ifdef MNH_IOCDF4
#ifdef MNH_IOCDF4
!-----------------------------------------------------------------------------
!-----------------------------------------------------------------------------
subroutine
Write_diachro_nc4
(
tpdiafile
,
tpfields
,
hgroup
,
htype
,
tpdates
,
pvar
,
oicp
,
ojcp
,
okcp
,
kil
,
kih
,
kjl
,
kjh
,
kkl
,
kkh
,
&
subroutine
Write_diachro_nc4
(
tpdiafile
,
tpfields
,
hgroup
,
htype
,
tpdates
,
pvar
,
oicp
,
ojcp
,
okcp
,
kil
,
kih
,
kjl
,
kjh
,
kkl
,
kkh
,
&
osplit
)
osplit
,
tpflyer
)
use
NETCDF
,
only
:
NF90_DEF_DIM
,
NF90_DEF_GRP
,
NF90_DEF_VAR
,
NF90_INQ_NCID
,
NF90_PUT_ATT
,
NF90_PUT_VAR
,
&
use
NETCDF
,
only
:
NF90_DEF_DIM
,
NF90_DEF_GRP
,
NF90_DEF_VAR
,
NF90_INQ_NCID
,
NF90_PUT_ATT
,
NF90_PUT_VAR
,
&
NF90_GLOBAL
,
NF90_NOERR
,
NF90_STRERROR
NF90_GLOBAL
,
NF90_NOERR
,
NF90_STRERROR
use
modd_budget
,
only
:
nbutshift
,
nbusubwrite
use
modd_aircraft_balloon
,
only
:
flyer
use
modd_budget
,
only
:
nbutshift
,
nbusubwrite
use
modd_conf
,
only
:
lcartesian
use
modd_field
use
modd_field
use
modd_io
,
only
:
isp
,
tfiledata
use
modd_io
,
only
:
isp
,
tfiledata
use
modd_les
,
only
:
nles_masks
use
modd_les
,
only
:
nles_masks
use
modd_parameters
,
only
:
jphext
use
modd_parameters
,
only
:
jphext
use
modd_precision
,
only
:
CDFINT
,
MNHREAL_NF90
use
modd_precision
,
only
:
CDFINT
,
MNHREAL_NF90
use
modd_type_date
,
only
:
date_time
use
modd_type_date
,
only
:
date_time
use
mode_io_field_write
,
only
:
IO_Field_create
,
IO_Field_write
,
IO_Field_write_box
use
mode_io_field_write
,
only
:
IO_Field_create
,
IO_Field_write
,
IO_Field_write_box
use
mode_io_tools_nc4
,
only
:
IO_Err_handle_nc4
use
mode_io_tools_nc4
,
only
:
IO_Err_handle_nc4
type
(
tfiledata
),
intent
(
in
)
::
tpdiafile
! File to write
type
(
tfiledata
),
intent
(
in
)
::
tpdiafile
! File to write
class
(
tfield_metadata_base
),
dimension
(:),
intent
(
in
)
::
tpfields
class
(
tfield_metadata_base
),
dimension
(:),
intent
(
in
)
::
tpfields
...
@@ -650,7 +654,9 @@ integer, intent(in), optional :: kil
...
@@ -650,7 +654,9 @@ integer, intent(in), optional :: kil
integer
,
intent
(
in
),
optional
::
kjl
,
kjh
integer
,
intent
(
in
),
optional
::
kjl
,
kjh
integer
,
intent
(
in
),
optional
::
kkl
,
kkh
integer
,
intent
(
in
),
optional
::
kkl
,
kkh
logical
,
intent
(
in
),
optional
::
osplit
logical
,
intent
(
in
),
optional
::
osplit
type
(
flyer
),
intent
(
in
),
optional
::
tpflyer
character
(
len
=
:),
allocatable
::
ystdnameprefix
integer
::
icompx
,
icompy
,
icompz
integer
::
icompx
,
icompy
,
icompz
integer
::
idims
integer
::
idims
integer
::
icount
integer
::
icount
...
@@ -663,6 +669,7 @@ integer(kind=CDFINT) :: igrpid
...
@@ -663,6 +669,7 @@ integer(kind=CDFINT) :: igrpid
integer
(
kind
=
CDFINT
)
::
istatus
integer
(
kind
=
CDFINT
)
::
istatus
logical
::
gdistributed
logical
::
gdistributed
logical
::
gsplit
logical
::
gsplit
type
(
tfielddata
)
::
tzfield
type
(
tfiledata
)
::
tzfile
type
(
tfiledata
)
::
tzfile
if
(
trim
(
htype
)
==
'CART'
.or.
trim
(
htype
)
==
'MASK'
.or.
trim
(
htype
)
==
'SPXY'
)
then
if
(
trim
(
htype
)
==
'CART'
.or.
trim
(
htype
)
==
'MASK'
.or.
trim
(
htype
)
==
'SPXY'
)
then
...
@@ -1181,6 +1188,35 @@ select case ( idims )
...
@@ -1181,6 +1188,35 @@ select case ( idims )
end
select
end
select
!Write X and Y position of the flyer
if
(
Present
(
tpflyer
)
)
then
if
(
lcartesian
)
then
ystdnameprefix
=
'plane'
else
ystdnameprefix
=
'projection'
endif
tzfield
%
cmnhname
=
'X'
tzfield
%
cstdname
=
Trim
(
ystdnameprefix
)
//
'_x_coordinate'
tzfield
%
clongname
=
'x-position of the flyer'
tzfield
%
cunits
=
'm'
tzfield
%
cdir
=
'--'
tzfield
%
ccomment
=
''
tzfield
%
ngrid
=
0
tzfield
%
ntype
=
TYPEREAL
tzfield
%
ltimedep
=
.false.
tzfield
%
ndims
=
1
tzfield
%
ndimlist
(
1
)
=
NMNHDIM_FLYER_TIME
tzfield
%
ndimlist
(
2
:)
=
NMNHDIM_UNUSED
call
IO_Field_write
(
tzfile
,
tzfield
,
tpflyer
%
x
)
tzfield
%
cmnhname
=
'Y'
tzfield
%
cstdname
=
Trim
(
ystdnameprefix
)
//
'_y_coordinate'
tzfield
%
clongname
=
'y-position of the flyer'
call
IO_Field_write
(
tzfile
,
tzfield
,
tpflyer
%
y
)
end
if
...
@@ -1224,7 +1260,7 @@ real, dimension(:,:), allocatable :: zdata2d
...
@@ -1224,7 +1260,7 @@ real, dimension(:,:), allocatable :: zdata2d
real
,
dimension
(:,:,:),
allocatable
::
zdata3d
real
,
dimension
(:,:,:),
allocatable
::
zdata3d
real
,
dimension
(:,:,:,:),
allocatable
::
zdata4d
real
,
dimension
(:,:,:,:),
allocatable
::
zdata4d
real
,
dimension
(:,:,:,:,:),
allocatable
::
zdata5d
real
,
dimension
(:,:,:,:,:),
allocatable
::
zdata5d
type
(
tfielddata
)
::
tzfield
type
(
tfielddata
)
::
tzfield
idims
=
Size
(
kdims
)
idims
=
Size
(
kdims
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment