Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mesonh/mesonh-code
  • quentin.rodier/mesonh-code-fork
  • benoit.vie/mesonh-code
  • joris.pianezze/mesonh-code
  • 8qq4g5s7/mesonh-code
  • jean.baptiste.filippi/meso-nh-fire-code
  • fdl68d9p/mesonh-code-sophia
7 results
Show changes
Commits on Source (4227)
Showing
with 1039 additions and 220 deletions
conf/profile_mesonh
conf/profile_mesonh-*
exe/*
MY_RUN/INTEGRATION_CASES/**/*.des
MY_RUN/INTEGRATION_CASES/**/*.dir
MY_RUN/INTEGRATION_CASES/**/*.hdr
MY_RUN/INTEGRATION_CASES/**/*.nc
MY_RUN/INTEGRATION_CASES/**/ecmwf.OD.????????.??
MY_RUN/INTEGRATION_CASES/**/file_for_xtransfer
MY_RUN/INTEGRATION_CASES/**/OUTPUT_LISTING*
MY_RUN/INTEGRATION_CASES/**/PRESSURE
MY_RUN/KTEST/*/*/*.des
MY_RUN/KTEST/*/*/*.lfi
MY_RUN/KTEST/*/*/*.nc
......@@ -36,10 +44,29 @@ MY_RUN/KTEST/009_ICARTT/001_pgd1/*.asc
MY_RUN/KTEST/009_ICARTT/002_arp2lfi/ecmwf.OD.20040810.18-V2
MY_RUN/KTEST/009_ICARTT/002_arp2lfi/mocage.GLOB22.20040810.18
MY_RUN/KTEST/9??_*
pub/ncl-?.?.?
pub/ncl_ncarg*/
pub/FILEPP/filepp*
!pub/FILEPP/filepp*.tar.gz
pub/FILEPP/FILEPP*
pub/FILEPP/MNH_Expand_*
!pub/FILEPP/MNH_EXPAND_*.tar.gz
src/dir_obj-*
src/LIB/eccodes*
!src/LIB/eccodes*.tar.gz
src/LIB/grib_api*
!src/LIB/grib_api*.tar.gz
src/LIB/hdf5*
!src/LIB/hdf5*.tar.gz
src/LIB/HDF5Plugin-Zstandard/build
src/LIB/libaec*
!src/LIB/libaec*.tar.gz
src/LIB/netcdf*
!src/LIB/netcdf*.tar.gz
src/LIB/MEGAN*
src/LIB/oasis3-mct*
!src/LIB/oasis3-mct*.tar.gz
src/LIB/toy*
!src/LIB/toy*.tar.gz
src/LIB/zstd*
!src/LIB/zstd*.tar.gz
vscode_mod
vscode_mod/
#
# Version of PACKAGE MESONH "Open distribution"
# PACK-MNH-V5-4-3
# DATE : 30/03/2020
# VERSION : MESONH MASDEV5_4 + BUG-3
# PACK-MNH-V6-0-0
# DATE : 02/04/2025
# VERSION : MESONH MASDEV6_0 + BUG-0
#
# MAP
#
......@@ -28,6 +28,10 @@
# e) cleaning previous compiled version
#
#
# NEW since MNH-56X : For conda package for graphic output in test-case examples , read
# the 'README_MNH_CONDA' file in this (root) directory
#
#
^L
# 0) TWO WAYS OF DOWNLOADING MESONH
# =================================
......@@ -80,14 +84,14 @@
#
# or directly
#
# http://mesonh.aero.obs-mip.fr/mesonh/dir_open/dir_MESONH/MNH-V5-4-3.tar.gz
# http://mesonh.aero.obs-mip.fr/mesonh/dir_open/dir_MESONH/MNH-V6-0-0.tar.gz
#
# Then untar the file "MNH-V5-4-3.tar.gz" where you want to.
# Then untar the file "MNH-V6-0-0.tar.gz" where you want to.
# For example, in your home directory:
#
cd ~
tar xvfz MNH-V5-4-3.tar.gz
tar xvfz MNH-V6-0-0.tar.gz
#
# Process now to the chapter to configure the MesoNH package.
......@@ -130,7 +134,7 @@ git lfs install
# only access) by following the next link:
#
http://mesonh.aero.obs-mip.fr/mesonh54/GitSources?action=AttachFile&do=get&target=anongitmesonh.key
http://mesonh.aero.obs-mip.fr/mesonh60/GitSources?action=AttachFile&do=get&target=anongitmesonh.key
#
# and save the file in your $HOME/.ssh/ directory.
......@@ -161,68 +165,68 @@ git config --global http.sslverify false
# This is necessary to disable the certificate checks because a self-signed
# certificate was used for the LFS server.
#
# c) Cloning the Meso-NH Source repository on the developpement branch MNH-54-branch
# c) Cloning the Meso-NH Source repository on the developpement branch MNH-60-branch
# ----------------------------------------------------------------------------------
#
# Finally you can clone the Meso-NH Git repository with the following command:
#
git lfs clone anongit@anongit_mesonh:/gitrepos/MNH-git_open_source-lfs.git -b MNH-54-branch MNH-V5-4-3
git clone anongit@anongit_mesonh:/gitrepos/MNH-git_open_source-lfs.git -b MNH-60-branch MNH-V6-0-0
#
# that will create the MNH-V5-4-3 directory containing a clone (copy) of the
# Meso-NH package on the remote developpement branch MNH-54-branch
# that will create the MNH-V6-0-0 directory containing a clone (copy) of the
# Meso-NH package on the remote developpement branch MNH-60-branch
#
#
# d) Checking out a given version of MESONH
# -----------------------------------------
#
# Once the repository is cloned, it's better for you to checkout your own branch
# (by default, you are on HEAD of the MNH-54-branch development branch ).
# (by default, you are on HEAD of the MNH-60-branch development branch ).
#
# To create your local branch corresponding to the V5-4-3 version, type:
# To create your local branch corresponding to the V6-0-0 version, type:
#
cd MNH-V5-4-3
git checkout -b MYB-MNH-V5-4-3 PACK-MNH-V5-4-3
cd MNH-V6-0-0
git checkout -b MYB-MNH-V6-0-0 PACK-MNH-V6-0-0
#
# MYB-MNH-V5-4-3 is the name of the local branch you created
# MYB-MNH-V6-0-0 is the name of the local branch you created
# and
# PACK-MNH-V5-4-3 is the remote/origin tag on which it is based.
# PACK-MNH-V6-0-0 is the remote/origin tag on which it is based.
#
# The advantage of this way of downloading the package is that in the future
# you could check/update quickly differences with the new version of the
# package without having to download entirely the full package.
#
# Suppose that a new version, for example "PACK-MNH-V5-4-4", is announced.
# Suppose that a new version, for example "PACK-MNH-V6-0-0", is announced.
#
# To see the differences with your working copy, do:
#
git fetch
git diff HEAD PACK-MNH-V5-4-4
git diff HEAD PACK-MNH-V6-0-0
#
# To go to the new version, you can, for example, create a new local branch:
#
git checkout -b MYB-MNH-V5-4-4 PACK-MNH-V5-4-4
git checkout -b MYB-MNH-V6-0-0 PACK-MNH-V6-0-0
#
# At any time, you can also check for "uptodate" changes in the Git branch
# dedicated to the MNH54 version before the official release of the "bugN+1"
# dedicated to the MNH60 version before the official release of the "bugN+1"
# bugfix version.
#
git fetch
git diff HEAD MNH-54-branch
git diff HEAD MNH-60-branch
#
# And, test this development (not yet official) version by going to this branch:
#
git checkout --track origin/MNH-54-branch
git checkout --track origin/MNH-60-branch
#
# e) Cloning the Meso-NH Documentation repository
#
......@@ -253,7 +257,7 @@ git clone anongit@anongit_mesonh:/gitrepos/MNH-DOC.git
# use the "./configure" script like this
#
cd ~/MNH-V5-4-3/src
cd ~/MNH-V6-0-0/src
./configure
. ../conf/profile_mesonh
......@@ -304,7 +308,7 @@ export OPTLEVEL=O2 # Compile in O2, 4 times faster then DEBUG, but less
# and then source/load the new generate file
. ../conf/profile_mesonh.LXifort.MNH-V5-4-3.MPIAUTO.O2
. ../conf/profile_mesonh.LXifort.MNH-V6-0-0.MPIAUTO.O2
#
# REM:
......@@ -329,7 +333,7 @@ export OPTLEVEL=O2 # Compile in O2, 4 times faster then DEBUG, but less
# go to the directory "src"
#
cd ~/MNH-V5-4-3/src
cd ~/MNH-V6-0-0/src
#
# if you have not already configured your MESONH environment
......@@ -558,7 +562,7 @@ make examples
#
cd $WORKDIR
cd MNH-V5-4-3/src
cd MNH-V6-0-0/src
./configure
......@@ -570,20 +574,24 @@ cd MNH-V5-4-3/src
# ---------
#
# - On JEAN-ZAY ( HPE ) the compilation is only possible in interactive :
# - On JEAN-ZAY ( HPE ) the compilation is in interactive :
cd MNH-V5-4-3/src
. ../conf/profile_mesonh-LXifort-R8I4-MNH-V5-4-3-MPIINTEL-O2
cd MNH-V6-0-0/src
. ../conf/profile_mesonh-LXifort-R8I4-MNH-V6-0-0-MPIINTEL-O2
make -j16 |& tee error$XYZ
make installmaster
# You could also use the 'compil' partition
sbatch job_make_mesonh_HPE_jeanzay
# - to run the test case examples run
sbatch -A {your_projet}@cpu job_make_examples_BullX_jeanzay
#
#
# at CINES on OCCIGEN (BULLX) :
# at CINES on ADASTRA (BULLX) :
# -------------------------------------------------------
#
# - install the PACKAGE in your $HOME ( default 50Go of quota )
......@@ -601,77 +609,108 @@ sbatch job_make_examples_BullX_occigen
# At TGCC , you have two architectures accessible throw 2 differents frontals
# but with a commun disk space , connect to :
#
# - ssh irene-fr : for Intel SkyLake/KNL processors
# On Intel processors the MPI use is OPENMPI/2.0.4
# - ssh irene-fr : for Intel SkyLake processors
# On Intel processors the MPI use is OPENMPI/4.1.4
# the configure will generate a
# profile_mesonh-LXifort-R8I4-MNH-V5-4-3-MPIAUTO-O2
# profile_mesonh-LXifort-R8I4-MNH-V6-0-0-MPIAUTO-O2
#
# - ssh irene-amd : for AMD , processors
# On AMD processors the MPI use is OPENMPI/4.02
# On AMD processors the MPI use is OPENMPI/4.1.4
# the configure will generate a
# profile_mesonh-LXifort-R8I4-MNH-V5-4-3-AMD-MPIAUTO-O2
# profile_mesonh-LXifort-R8I4-MNH-V6-0-0-AMD-MPIAUTO-O2
#
# - install the PACKAGE in your $CCCHOME ( default 20Go of quota )
# - Compile in interactive mode ( see IDRIS )
#
# At TGCC they use 'one login' for multi-project allocation .
# This induce 'strange' problem with the installation of eccodes
# resulting in file with the wrong default group and 'disk quota excedeed' error
#
# You could get your different project info by 'ccc_myproject'
#
# I recommand you first, supposing that the "Genci Allocation" you want to use
# as for projet group "genXXXX"
#
# 1) to add in your "~/.bash_profile"
#
module switch dfldatadir dfldatadir/genXXXX
newgrp genXXXX
# 2) "logout & login" again
# and check that you have now the good default group
#
id -ng
--> genXXXX
echo $CCCHOME
--> /ccc/.../home/genXXXX/{your_login}
# If all is OK, you can install the code interactively as usual
#
# - install the PACKAGE in your ${CCCHOME} ( default 20Go of quota )
# for example on Intel frontal
cd ${CCCHOME}
cd MNH-V6-0-0/src
./configure
. ../conf/profile_mesonh-LXifort-R8I4-MNH-V6-0-0-MPIAUTO-O2
make -j16 |& tee error$XYZ
make installmaster
# REM: The eccode lib will be installed in your ${CCCWORKDIR}
# also for the quota problem ...
#
# - to run the test case examples run
#
# On intel Skylake
ccc_msub job_make_examples_BullX_irene
# On intel Knl
ccc_msub -q knl job_make_examples_BullX_irene
# On intel AMD
ccc_msub job_make_examples_BullX_irene_AMD
#
# at ECMWF on cca ( CRAY/XC30 ) :
# ----------------------------
# at ECMWF on hpc-login ( ATos/HPCF ) :
# ------------------------------------------
#
# - to install MESONH go to your $HPCPERM directory
#
# - to install MESONH go to your $PERM directory
# if you need more disk space than allowed for 'standard' user
# Ask to Dominique Lucas, look this email :
# http://mesonh.aero.obs-mip.fr/mesonh/dir_interne/dir_mail_mesonh_cnrm/dir_mail/2009_09_24_15:31:54.eml
# - for the compilation :
# after the ./configure in the login node
#
# - for the compilation use :
# connecte to an "interactive compute node" via ( 16 core & 16GO of memory
qsub job_make_mesonh_CRAY_cca
ecinteractive -c16 -m 16G -t 12:00:00
# - to run the test case examples run
etc ...
qsub job_make_examples_CRAY_cca
#
# REM : On CRAY computer cca , I switch the default compiler to the INTEL one .
# Some trouble with the is the CRAY one = crayftn .
# - to run the test case examples run
sbatch job_make_examples_Atos_HPCF
#
# - At Meteo-France DSI on beaufix (or prolix)
# - At Meteo-France DSI on belenos
#
# to install the whole package on your "$HOME" directory
# untar the file "MNH-V5-4-3.tar.gz" from its location :
# untar the file "MNH-V6-0-0.tar.gz" from its location :
cd ~
tar xvf $MESONH/MNH-V5-4-3.tar.gz
tar xvf $MESONH/MNH-V6-0-0.tar.gz
# run the "./configure" command :
cd MNH-V5-4-3/src
cd MNH-V6-0-0/src
./configure
#
# Due to limitation in time & memory on interactive connection
# then compile the MESONH PACKAGE in batch mode with the job_make_mesonh_BullX file :
# then compile the MESONH PACKAGE in batch mode with the job_make_mesonh_BullX_belenos file :
sbatch job_make_mesonh_BullX
sbatch job_make_mesonh_BullX_belenos
# This job does : gmake -j 4
# then : make installmaster
# To run basic KTEST examples :
sbatch job_make_examples_BullX
sbatch job_make_examples_BullX_belenos
# Step-2 : configure/compiling with VER_USER=...
# ----------------------------------------------
......@@ -688,8 +727,7 @@ export VER_USER=MY_MODIF
# in job_make_mesonh_user_BullX insert " export VER_USER=MY_MODIF "
# then submit in batch mode
sbatch job_make_mesonh_user_BullX
sbatch job_make_mesonh_user_BullX_belenos
#
#
......@@ -697,7 +735,7 @@ sbatch job_make_mesonh_user_BullX
# -------------------------------------------------------
#
# - install the PACKAGE in your /tmpdir/$USER
# - Compile in interactive mode ( see IDRIS )
# - Compile in interactive mode
#
# - to run the test case examples run
......@@ -711,7 +749,7 @@ sbatch job_make_examples_BullX_olympe
# VII) "SCANDOLLAR" = SCRIPTING YOUR OWN PROCEDURES
# ====================================================
REM : not tested on 5-4-X version ...
REM : not tested on 5-5-X version ...
# A small script 'scandollar' is in test in this version of MESONH.
# It will help you to build a complete chaining of an experiment.
......@@ -757,7 +795,7 @@ scandollar
## OUTPUT ::
># read default config file :: ---> CONF_DOLLAR=/home/escj/DEV64/PACK-MNH-V5-4-3/conf/post/confdollar_aeropc_default
># read default config file :: ---> CONF_DOLLAR=/home/escj/DEV64/PACK-MNH-V6-0-0/conf/post/confdollar_aeropc_default
>#
># read user config file :: ---> CONFIG=confdollar
>#
......@@ -779,7 +817,7 @@ scandollar 0*
## OUTPUT ::
>#
># read default config file :: ---> CONF_DOLLAR=/home/escj/DEV64/PACK-MNH-V5-4-3/conf/post/confdollar_aeropc_default
># read default config file :: ---> CONF_DOLLAR=/home/escj/DEV64/PACK-MNH-V6-0-0/conf/post/confdollar_aeropc_default
>#
># read user config file :: ---> CONFIG=confdollar
>#
......@@ -853,22 +891,22 @@ cp -R 007_16janvier_scandollar /.../your_directory
#
# use this "profile_mesonh" :
. /home/rech/mnh/rmnh007/DEV/MNH-V5-4-3/conf/profile_mesonh-SX8-MNH-V5-4-3-MPIAUTO-O4
. /home/rech/mnh/rmnh007/DEV/MNH-V6-0-0/conf/profile_mesonh-SX8-MNH-V6-0-0-MPIAUTO-O4
# And the examples are here ( link to my $WORKDIR in actually )
/home/rech/mnh/rmnh007/DEV/MNH-V5-4-3/MY_RUN/KTEST/007_16janvier_scandollar
/home/rech/mnh/rmnh007/DEV/MNH-V6-0-0/MY_RUN/KTEST/007_16janvier_scandollar
#
# On vargas
# ---------
# use this "profile_mesonh" :
. /workgpfs/rech/mnh/rmnh007/DEV/MNH-V5-4-3/conf/profile_mesonh-AIX64-MNH-V5-4-3-MPIAUTO-O2
. /workgpfs/rech/mnh/rmnh007/DEV/MNH-V6-0-0/conf/profile_mesonh-AIX64-MNH-V6-0-0-MPIAUTO-O2
# and examples here :
/workgpfs/rech/mnh/rmnh007/DEV/MNH-V5-4-3/MY_RUN/KTEST/007_16janvier_scandollar
/workgpfs/rech/mnh/rmnh007/DEV/MNH-V6-0-0/MY_RUN/KTEST/007_16janvier_scandollar
#
# - At CINES on JADE :
......@@ -876,11 +914,11 @@ cp -R 007_16janvier_scandollar /.../your_directory
#
# use
. /work/escobar/DEV/MNH-V5-4-3/conf/profile_mesonh-LXifort-MNH-V5-4-3-MPIICE-O2
. /work/escobar/DEV/MNH-V6-0-0/conf/profile_mesonh-LXifort-MNH-V6-0-0-MPIICE-O2
# and the exemples
/work/escobar/DEV/MNH-V5-4-3/MY_RUN/KTEST/007_16janvier_scandollar
/work/escobar/DEV/MNH-V6-0-0/MY_RUN/KTEST/007_16janvier_scandollar
#
# - At ECMWF on cxa :
......@@ -888,11 +926,11 @@ cp -R 007_16janvier_scandollar /.../your_directory
#
# use
. /c1a/ms_perm/au5/MNH-V5-4-3/conf/profile_mesonh-AIX64-MNH-V5-4-3-MPIAUTO-O2
. /c1a/ms_perm/au5/MNH-V6-0-0/conf/profile_mesonh-AIX64-MNH-V6-0-0-MPIAUTO-O2
# and the examples
/c1a/ms_perm/au5/MNH-V5-4-3/MY_RUN/KTEST/007_16janvier_scandollar
/c1a/ms_perm/au5/MNH-V6-0-0/MY_RUN/KTEST/007_16janvier_scandollar
#
......@@ -984,70 +1022,58 @@ git clone -b 2014.01 https://github.com/forefireAPI/firefront.git
# b) MNH_RTTOV for optional radiative computation
# --------------------------------------
#
# The RTTOV package was not included into the open source version of Meso-NH
# The RTTOV 13.2 package was not included into the open source version of Meso-NH
# because it needs a licence agrement.
#
# ----------------------------------
# OPTION 1: Use version 11.3 of RTTOV
# -----------------------------------
# Download the RTTOV package rttov113.tar.gz by following the instructions given on http://nwpsaf.eu/site/software/rttov/
#
# Install the RTTOV package rttov113.tar.gz
cd MNH.../src/LIB
mkdir RTTOV-11.3
cd RTTOV-11.3
tar xvfz rttov113.tar.gz
cd src
make ARCH=ifort # Use Intel "ifort" compiler; other options: gfortran, NAG, pgf90, IBM
#
# And then for the compilation, run the 'configure' script preceded with the setting of the MNH_RTTOV variable:
# Run the 'configure' script preceded with the setting of the MNH_RTTOV variable:
#
cd MNH.../src/
cd $SRC_MESONH/src/
export MNH_RTTOV=1
export VER_RTTOV=11.3
./configure
etc ...
# ----------------------------------
# OPTION 2: Use version 8.7 of RTTOV
# ----------------------------------
# For already(old) licencied MesoNH users (MNH-4-X version with research licence see here: http://mesonh.aero.obs-mip.fr/mesonh410/UserInformation)
#
# the package could be reloaded in this way
#
# - With cvs access
#
cd MNH.../src/LIB
cvs up -rPACK-MNH-V4-10-3 -d -P RTTOV
export VER_RTTOV=13.2
#
# Compile the HDF5 library
#
make cdf
#
# Download the RTTOV package rttov132.tar.xz by following the instructions given on https://nwpsaf.eu/site/software/rttov/
#
# Install the RTTOV package rttov132.tar.xz
cd $SRC_MESONH/src/LIB
mkdir RTTOV-13.2
cd RTTOV-13.2
tar xJf rttov132.tar.xz
cd build
edit Makefile.local and set HDF5_PREFIX, FFLAGS_HDF5 and LDFLAGS_HDF5 as shown below
"
HDF5_PREFIX = $(SRC_MESONH)/src/dir_obj${XYZ}/MASTER/NETCDF-${VERSION_CDFF}
FFLAGS_HDF5 = -D_RTTOV_HDF $(FFLAG_MOD)$(HDF5_PREFIX)/include
LDFLAGS_HDF5 = -L$(HDF5_PREFIX)/lib64 -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lsz -laec -lz -ldl
"
cd ../src
../build/Makefile.PL RTTOV_HDF=1
make ARCH=ifort # Use Intel "ifort" compiler; other options: gfortran, NAG, pgf90, IBM
#
# - With WEB access (with WEB login/pass as usually) the RTTOV package could also be retrieve in tarball with wget like this:
# And then for the Meso-NH compilation, do
#
cd $SRC_MESONH/src/
make
cd MNH.../src/LIB
wget --http-user=USER --http-password=PASS 'http://mesonh.aero.obs-mip.fr/cgi-bin/mesonh_interne/viewcvs.cgi/MNH-VX-Y-Z/src/LIB/RTTOV/?view=tar&pathrev=PACK-MNH-V4-10-3' -O RTTOV.tar.gz
tar xvfz RTTOV.tar.gz
# /!\ don't forget the ''. Otherwise, this will not work!
# c) MNH_ECRAD for optional compilation of new ECRAD radiative library from ECMWF
# --------------------------------------
#
# And then for the compilation, run the 'configure' script preceded with the setting of the MNH_RTTOV variable:
# The default version of ECRAD is 1.4.0 (open-source)
#
cd MNH.../src/
export MNH_RTTOV=1
export VER_RTTOV=8.7
# Configure & Compilation
export MNH_ECRAD=1
./configure
etc ...
# c) MNH_ECRAD for optional compilation of new ECRAD radiative library from ECMWF
# --------------------------------------
# The version of ECRAD is set by (by default):
# export VER_ECRAD=140
#
# To use the previous version 1.0.1:
#
# The full ECRAD package was not included into the open source version of Meso-NH
# The full ECRAD package 1.0.1 was not included into the open source version of Meso-NH
# because it needs a licence agrement.
#
# See here to get the licence & full sources : https://software.ecmwf.int/wiki/display/ECRAD/ECMWF+Radiation+Scheme+Home
......@@ -1061,6 +1087,7 @@ tar xvfz ecrad-1.0.1.tar.gz
# Configure & Compilation
export MNH_ECRAD=1
export VER_ECRAD=101
./configure
etc ...
......@@ -1070,8 +1097,8 @@ etc ...
#
# Usage :
# 1) In namelist replace RAD='ECMW' by RAD='ECRA'
# 2) Add link to all 'ecrad-1.0.1/data' files in your mesonh run directory
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.0.1/data/* .
# 2) Add link to all 'ecrad-1.X.X/data' files in your mesonh run directory
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.X.X/data/* .
#
# REM : you can replace CDATADIR = "." by CDATADIR = "data" of ini_radiations_ecrad.f90 to link only the data folder instead of all the files one by one
#
......
!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 1994-2025 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 version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
......@@ -10,6 +10,7 @@ program LFI2CDF
USE MODD_CONF, ONLY: CPROGRAM
USE MODD_CONFZ, ONLY: NB_PROCIO_R
USE MODD_DIM_n, ONLY: NIMAX_ll, NJMAX_ll, NKMAX
USE MODD_GRID_n, ONLY: XXHAT, XXHATM, XYHAT, XYHATM
USE MODD_IO, ONLY: LVERB_OUTLST, LVERB_STDOUT, NIO_ABORT_LEVEL, NIO_VERB, NGEN_ABORT_LEVEL, NGEN_VERB
USE MODD_PARAMETERS, ONLY: JPHEXT, JPVEXT
USE MODD_TIMEZ, ONLY: TIMEZ
......@@ -17,7 +18,9 @@ program LFI2CDF
use mode_field, only: Ini_field_list
USE MODE_IO, ONLY: IO_Init, IO_Config_set
use mode_ll
use mode_modeln_handler, only: Goto_model
USE mode_options
USE MODE_SET_GRID, ONLY: INTERP_HORGRID_TO_MASSPOINTS
USE MODE_SPLITTINGZ_ll, ONLY: INI_PARAZ_ll
USE mode_util
......@@ -48,14 +51,16 @@ program LFI2CDF
CPROGRAM = 'LFICDF'
CALL Goto_model(1)
CALL IO_Init()
CALL VERSION
CALL INI_CST
ALLOCATE(TIMEZ) !Used by IO_WRITE_FIELD
NIO_VERB = NVERB_WARNING
NGEN_VERB = NVERB_WARNING
NIO_VERB = NVERB_INFO
NGEN_VERB = NVERB_INFO
NIO_ABORT_LEVEL = NVERB_FATAL
NGEN_ABORT_LEVEL = NVERB_FATAL
LVERB_OUTLST = .FALSE.
......@@ -91,7 +96,7 @@ program LFI2CDF
CALL IO_Config_set()
END IF
CALL INI_FIELD_LIST(1)
CALL INI_FIELD_LIST()
CALL OPEN_FILES(infiles, outfiles, nfiles_out, hinfile, houtfile, nbvar_infile, options, runmode)
IF (options(OPTLIST)%set) STOP
......@@ -108,6 +113,12 @@ program LFI2CDF
CALL SET_YEND_ll(NJMAX_ll+2*JPHEXT, 1)
CALL INI_PARAZ_ll(IINFO_ll)
! This has to be done after INI_PARAZ_ll and after reading of XXHAT and XYHAT (in OPEN_FILES)
ALLOCATE(XXHATM(NIMAX_ll+2*JPHEXT))
ALLOCATE(XYHATM(NJMAX_ll+2*JPHEXT))
! Interpolations of positions to mass points
CALL INTERP_HORGRID_TO_MASSPOINTS( XXHAT, XYHAT, XXHATM, XYHATM )
IF (runmode == MODELFI2CDF .OR. runmode == MODECDF2CDF) THEN
IF (options(OPTVAR)%set) THEN
! nbvar_tbr is computed from number of requested variables
......
!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 1994-2025 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 version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
......@@ -15,7 +15,7 @@
! P. Wautelet 10/11/2020: new data structures for netCDF dimensions
!-----------------------------------------------------------------
MODULE mode_util
use modd_field, only: tfielddata, tfieldlist
use modd_field, only: tfieldmetadata, tfieldlist
USE MODD_IO, ONLY: TFILEDATA, TFILE_ELT
USE MODD_NETCDF, ONLY: CDFINT, tdimnc
USE MODD_PARAMETERS, ONLY: NLFIMAXCOMMENTLENGTH, NMNHNAMELGTMAX
......@@ -56,7 +56,7 @@ MODULE mode_util
INTEGER(kind=CDFINT) :: NTYPE_FILE ! netCDF datatype (NF90_CHAR, NF90_INT...) (as present in input file)
INTEGER,DIMENSION(MAXRAW) :: src ! List of variables used to compute the variable (needed only if calc=.true.)
INTEGER :: tgt ! Target: id of the variable that use it (calc variable)
TYPE(TFIELDDATA) :: TFIELD ! Metadata about the field
TYPE(TFIELDMETADATA) :: TFIELD ! Metadata about the field
TYPE(tdimnc),DIMENSION(:),ALLOCATABLE :: TDIMS ! Dimensions of the field
END TYPE workfield
......@@ -69,6 +69,7 @@ CONTAINS
SUBROUTINE parse_infiles(infiles, outfiles, KNFILES_OUT, nbvar_infile, nbvar_tbr, nbvar_calc, nbvar_tbw, &
tpreclist, options, runmode)
USE MODD_DIM_n, ONLY: NIMAX_ll, NJMAX_ll, NKMAX
use modd_io, only: nio_verb
USE MODD_PARAMETERS, ONLY: JPHEXT, JPVEXT, NGRIDUNKNOWN
use mode_io_tools_nc4, only: IO_Dimids_guess_nc4
......@@ -126,10 +127,11 @@ CONTAINS
kcdf_id = INFILES(1)%TFILE%NNCID
END IF
PRINT *,'MESONH 3D, 2D articles DIMENSIONS used :'
PRINT *,'DIMX =',NIMAX_ll+2*JPHEXT
PRINT *,'DIMY =',NJMAX_ll+2*JPHEXT
PRINT *,'DIMZ =',NKMAX +2*JPVEXT
WRITE( cmnhmsg(1), '( A )' ) 'MESONH 3D, 2D articles DIMENSIONS used :'
WRITE( cmnhmsg(2), '( "DIMX = ", I0 )' ) NIMAX_ll + 2 * JPHEXT
WRITE( cmnhmsg(3), '( "DIMY = ", I0 )' ) NJMAX_ll + 2 * JPHEXT
WRITE( cmnhmsg(4), '( "DIMZ = ", I0 )' ) NKMAX + 2 * JPVEXT
call Print_msg( NVERB_INFO, 'IO', 'parse_infiles' )
! Phase 1 : build articles list to convert.
!
......@@ -270,10 +272,14 @@ CONTAINS
END DO
maxvar = nbvar_tbr+nbvar_calc
DO ji=1,nbvar_tbr+nbvar_calc
print *,ji,'name=',trim(tpreclist(ji)%name),' calc=',tpreclist(ji)%calc,' tbw=',tpreclist(ji)%tbw,&
' tbr=',tpreclist(ji)%tbr,' found=',tpreclist(ji)%found
END DO
if ( nio_verb >= NVERB_INFO ) then
do ji = 1, nbvar_tbr + nbvar_calc
write ( cmnhmsg(1), '( I0, " name=", A, "calc=", L1, " tbw=", L1, " tbr=", L1, " found=", L1 )' ) &
ji, tpreclist(ji)%name, tpreclist(ji)%calc, tpreclist(ji)%tbw, tpreclist(ji)%tbr, tpreclist(ji)%found
call Print_msg( NVERB_INFO, 'IO', 'parse_infiles' )
end do
end if
ELSE
! Entire file is converted
......@@ -388,7 +394,7 @@ END DO
ELSE
CALL FIND_FIELD_ID_FROM_MNHNAME(tpreclist(ji)%name,IID,IRESP,ONOWARNING=.TRUE.)
IF (IRESP==0) THEN
tpreclist(ji)%TFIELD = TFIELDLIST(IID)
tpreclist(ji)%TFIELD = TFIELDMETADATA( TFIELDLIST(IID) )
! Determine TDIMS
IF (runmode==MODELFI2CDF) THEN
ALLOCATE(tpreclist(ji)%TDIMS(tpreclist(ji)%TFIELD%NDIMS))
......@@ -411,11 +417,11 @@ END DO
ELSE !Field not found in list, try to determine characteristics
tpreclist(ji)%TFIELD%CMNHNAME = TRIM(tpreclist(ji)%name)
tpreclist(ji)%TFIELD%CSTDNAME = ''
tpreclist(ji)%TFIELD%CLONGNAME = TRIM(tpreclist(ji)%name)
tpreclist(ji)%TFIELD%CUNITS = ''
!Set in IO_Metadata_get_nc4 (and not used for LFI) tpreclist(ji)%TFIELD%CLONGNAME = TRIM(tpreclist(ji)%name)
!Set in IO_Metadata_get_nc4 (and not used for LFI) tpreclist(ji)%TFIELD%CUNITS = ''
tpreclist(ji)%TFIELD%CDIR = 'XY' !Assumption...
tpreclist(ji)%TFIELD%CLBTYPE = 'NONE'
tpreclist(ji)%TFIELD%CCOMMENT = ''
!Set in IO_Metadata_get_nc4 (and not used for LFI) tpreclist(ji)%TFIELD%CCOMMENT = ''
!
IF (runmode==MODELFI2CDF) THEN
tpreclist(ji)%TFIELD%NGRID = 1 !Assumption
......@@ -570,7 +576,6 @@ END DO
tpreclist(ji)%TFIELD%NTYPE = tpreclist(idx_var)%TFIELD%NTYPE
tpreclist(ji)%TFIELD%NDIMS = tpreclist(idx_var)%TFIELD%NDIMS
#if 0
!PW: TODO?
tpreclist(ji)%TFIELD%NFILLVALUE
tpreclist(ji)%TFIELD%XFILLVALUE
tpreclist(ji)%TFIELD%NVALIDMIN
......@@ -978,7 +983,8 @@ END DO
USE MODD_CONFZ, ONLY: NB_PROCIO_R
USE MODD_DIM_n, ONLY: NIMAX_ll, NJMAX_ll, NKMAX
USE MODD_GRID, ONLY: XBETA, XRPK, XLAT0, XLON0, XLATORI, XLONORI
USE MODD_GRID_n, ONLY: LSLEVE, XXHAT, XYHAT, XZHAT
USE MODD_GRID_n, ONLY: LSLEVE, XXHAT, XXHATM, XYHAT, XYHATM, XZHAT, XZHATM, &
XXHAT_ll, XYHAT_ll, XXHATM_ll, XYHATM_ll
USE MODD_IO, ONLY: LIOCDF4
USE MODD_PARAMETERS, ONLY: JPHEXT, JPVEXT
USE MODD_PARAMETERS_ll, ONLY: JPHEXT_ll=>JPHEXT, JPVEXT_ll=>JPVEXT
......@@ -986,6 +992,7 @@ END DO
USE MODE_IO_FILE, ONLY: IO_FILE_OPEN, IO_FILE_CLOSE
USE MODE_IO_MANAGE_STRUCT, ONLY: IO_FILE_ADD2LIST
USE MODE_SET_GRID, ONLY: INTERP_VERGRID_TO_MASSPOINTS
TYPE(TFILE_ELT),DIMENSION(:),INTENT(OUT) :: infiles
TYPE(TFILE_ELT),DIMENSION(:),INTENT(OUT) :: outfiles
......@@ -998,6 +1005,7 @@ END DO
character(len=:), allocatable :: yunits
INTEGER :: idx, IRESP2
integer :: iiu, iju, iku
integer :: inb_procio_r_save
INTEGER(KIND=CDFINT) :: ioldmode
INTEGER(KIND=CDFINT) :: istatus
......@@ -1020,13 +1028,17 @@ END DO
CALL IO_FILE_ADD2LIST(INFILES(1)%TFILE,HINFILE,'MNH','READ',HFORMAT='NETCDF4')
CALL IO_FILE_OPEN(INFILES(1)%TFILE)
nbvar_infile = INFILES(1)%TFILE%NNCNAR
istatus = NF90_INQUIRE( infiles(1)%tfile%nncid, nvariables=nbvar_infile )
if (istatus /= NF90_NOERR) then
call Print_msg( NVERB_FATAL, 'IO', 'OPEN_FILES', 'NF90_INQUIRE for ' &
// trim(infiles(1)%tfile%cname) // '.nc: ' // NF90_STRERROR(istatus) )
end if
!Open fallback file if provided
if ( options( OPTFALLBACK )%set ) then
inb_procio_r_save = NB_PROCIO_R
NB_PROCIO_R = 1
CALL IO_FILE_ADD2LIST(INFILES(2)%TFILE,options( OPTFALLBACK )%cvalue,'UNKNOWN','READ',HFORMAT='NETCDF4')
CALL IO_FILE_ADD2LIST(INFILES(2)%TFILE,options( OPTFALLBACK )%cvalue,'MNH','READ',HFORMAT='NETCDF4')
CALL IO_FILE_OPEN(INFILES(2)%TFILE)
NB_PROCIO_R = inb_procio_r_save
end if
......@@ -1096,18 +1108,33 @@ END DO
if ( options( OPTFALLBACK )%set .and. iresp2 /= 0 ) CALL IO_Field_read(INFILES(2)%TFILE,'STORAGE_TYPE',CSTORAGE_TYPE,IRESP2)
if ( iresp2 /= 0 ) call Print_msg( NVERB_ERROR, 'IO', 'OPEN_FILES', 'STORAGE_TYPE not found')
!
ALLOCATE(XXHAT(NIMAX_ll+2*JPHEXT))
iiu = nimax_ll + 2 * JPHEXT
ALLOCATE( XXHAT(iiu), XXHATM(iiu) )
CALL IO_Field_read(INFILES(1)%TFILE,'XHAT',XXHAT,IRESP2)
!If not found in main file, try the fallback one
if ( options( OPTFALLBACK )%set .and. iresp2 /= 0 ) CALL IO_Field_read(INFILES(2)%TFILE,'XHAT',XXHAT,IRESP2)
if ( iresp2 /= 0 ) call Print_msg( NVERB_ERROR, 'IO', 'OPEN_FILES', 'XHAT not found')
ALLOCATE(XYHAT(NJMAX_ll+2*JPHEXT))
iju = njmax_ll + 2 * JPHEXT
ALLOCATE( XYHAT(iju), XYHATM(iju) )
CALL IO_Field_read(INFILES(1)%TFILE,'YHAT',XYHAT,IRESP2)
!If not found in main file, try the fallback one
if ( options( OPTFALLBACK )%set .and. iresp2 /= 0 ) CALL IO_Field_read(INFILES(2)%TFILE,'YHAT',XYHAT,IRESP2)
if ( iresp2 /= 0 ) call Print_msg( NVERB_ERROR, 'IO', 'OPEN_FILES', 'YHAT not found')
! Interpolations of positions to mass points
XXHATM(1:IIU-1) = 0.5 * XXHAT(1:IIU-1) + 0.5 * XXHAT(2:IIU)
XXHATM( IIU) = 1.5 * XXHAT( IIU) - 0.5 * XXHAT(IIU-1)
XYHATM(1:IJU-1) = 0.5 * XYHAT(1:IJU-1) + 0.5 * XYHAT(2:IJU)
XYHATM( IJU) = 1.5 * XYHAT( IJU) - 0.5 * XYHAT(IJU-1)
! Set global domain boundaries (hypothesis: only 1 process)
XXHAT_ll => XXHAT
XYHAT_ll => XYHAT
XXHATM_ll => XXHATM
XYHATM_ll => XYHATM
CALL IO_Field_read(INFILES(1)%TFILE,'CARTESIAN',LCARTESIAN,IRESP2)
!If not found in main file, try the fallback one
if ( options( OPTFALLBACK )%set .and. iresp2 /= 0 ) CALL IO_Field_read(INFILES(2)%TFILE,'CARTESIAN',LCARTESIAN,IRESP2)
......@@ -1147,12 +1174,16 @@ END DO
!
IF (TRIM(CPROGRAM_ORIG)/='PGD' .AND. TRIM(CPROGRAM_ORIG)/='NESPGD' .AND. TRIM(CPROGRAM_ORIG)/='ZOOMPG' &
.AND. .NOT.(TRIM(CPROGRAM_ORIG)=='REAL' .AND. CSTORAGE_TYPE=='SU') ) THEN !condition to detect PREP_SURFEX
ALLOCATE(XZHAT(NKMAX+2*JPVEXT))
iku = nkmax + 2 * JPVEXT
ALLOCATE( XZHAT(iku), XZHATM(iku) )
CALL IO_Field_read(INFILES(1)%TFILE,'ZHAT',XZHAT,IRESP2)
!If not found in main file, try the fallback one
if ( options( OPTFALLBACK )%set .and. iresp2 /= 0 ) CALL IO_Field_read(INFILES(2)%TFILE,'ZHAT',XZHAT,IRESP2)
if ( iresp2 /= 0 ) call Print_msg( NVERB_ERROR, 'IO', 'OPEN_FILES', 'ZHAT not found')
! Interpolations of vertical positions to mass points
CALL INTERP_VERGRID_TO_MASSPOINTS( XZHAT, XZHATM )
ALLOCATE(LSLEVE)
CALL IO_Field_read(INFILES(1)%TFILE,'SLEVE',LSLEVE,IRESP2)
!If not found in main file, try the fallback one
......@@ -1265,7 +1296,7 @@ END DO
CALL IO_FILE_OPEN(outfiles(idx)%TFILE,HPROGRAM_ORIG=CPROGRAM_ORIG)
END IF
PRINT *,'--> Converted to file: ', TRIM(houtfile)
call Print_msg( NVERB_INFO, 'IO', 'parse_infiles', '--> Converted to file: ' // trim(houtfile) )
END SUBROUTINE OPEN_FILES
......@@ -1375,6 +1406,7 @@ END DO
INTEGER(KIND=CDFINT) :: IVAR_ID
INTEGER(KIND=CDFINT),DIMENSION(NF90_MAX_VAR_DIMS) :: IDIMS_ID
LOGICAL :: GSPLIT_AT_ENTRY
LOGICAL :: GSPLIT_INFO_AVAILABLE
CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Metadata_get_nc4','called')
......@@ -1390,9 +1422,12 @@ END DO
if ( istatus /= NF90_NOERR ) call IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_INQUIRE_VARIABLE', '' )
!split_variable and other attributes were added in MesoNH > 5.4.2
GSPLIT_INFO_AVAILABLE = .FALSE.
ISTATUS = NF90_INQUIRE_ATTRIBUTE(IFILE_ID, KVAR_ID, 'split_variable', LEN=ILENG)
IF (ISTATUS == NF90_NOERR) THEN
IF (GSPLIT_AT_ENTRY) CALL PRINT_MSG(NVERB_ERROR,'IO','IO_Metadata_get_nc4','split variable delcaration inside a split file')
GSPLIT_INFO_AVAILABLE = .TRUE.
IF (GSPLIT_AT_ENTRY) CALL PRINT_MSG(NVERB_ERROR,'IO','IO_Metadata_get_nc4','split variable declaration inside a split file')
ALLOCATE(CHARACTER(LEN=ILENG) :: YSPLIT)
ISTATUS = NF90_GET_ATT(IFILE_ID, KVAR_ID, 'split_variable', YSPLIT)
......@@ -1423,7 +1458,6 @@ END DO
ISTATUS = NF90_GET_ATT(IFILE_ID, KVAR_ID, 'split_nblocks', iblocks)
IF (istatus /= NF90_NOERR) CALL IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_GET_ATT', 'split_nblocks' )
!PW: todo:check tfiles_ioz exist
IFILE_ID = TPFILE%TFILES_IOZ(1)%TFILE%NNCID
istatus = NF90_INQ_VARID(IFILE_ID,trim(TPREC%NAME)//'0001',ivar_id)
......@@ -1441,65 +1475,14 @@ END DO
DEALLOCATE(YSPLIT)
END IF
ISTATUS = NF90_GET_ATT(IFILE_ID,KVAR_ID,'grid',TPREC%NGRID_FILE)
!On MesoNH versions < 5.4.0, the grid number was stored in 'GRID' instead of 'grid'
IF (ISTATUS /= NF90_NOERR) ISTATUS = NF90_GET_ATT(IFILE_ID,KVAR_ID,'GRID',TPREC%NGRID_FILE)
IF (ISTATUS /= NF90_NOERR) TPREC%NGRID_FILE = 0
ISTATUS = NF90_GET_ATT(IFILE_ID,KVAR_ID,'units',TPREC%CUNITS_FILE)
IF (ISTATUS /= NF90_NOERR) TPREC%CUNITS_FILE = ''
!split_variable and other attributes were added in MesoNH > 5.4.2
ISTATUS = NF90_INQUIRE_ATTRIBUTE(IFILE_ID, KVAR_ID, 'split_variable', LEN=ILENG)
IF (ISTATUS == NF90_NOERR) THEN
IF (GSPLIT_AT_ENTRY) CALL PRINT_MSG(NVERB_ERROR,'IO','IO_Metadata_get_nc4','split variable declaration inside a split file')
ALLOCATE(CHARACTER(LEN=ILENG) :: YSPLIT)
ISTATUS = NF90_GET_ATT(IFILE_ID, KVAR_ID, 'split_variable', YSPLIT)
IF (istatus /= NF90_NOERR) call IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_GET_ATT', 'split_variable' )
IF ( YSPLIT == 'yes' ) then
TPREC%LSPLIT = .true.
ISTATUS = NF90_GET_ATT(IFILE_ID, KVAR_ID, 'ndims', TPREC%NDIMS_FILE)
IF (istatus /= NF90_NOERR) CALL IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_GET_ATT', 'ndims' )
IF ( TPREC%NDIMS_FILE/=3 ) CALL PRINT_MSG(NVERB_ERROR,'IO','IO_Metadata_get_nc4', &
'split variable with ndims/=3 not supported')
ISTATUS = NF90_INQUIRE_ATTRIBUTE(IFILE_ID, KVAR_ID, 'time_dependent', LEN=ILENG)
IF (istatus /= NF90_NOERR) &
CALL IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_INQUIRE_ATTRIBUTE', 'time_dependent' )
ALLOCATE(CHARACTER(LEN=ILENG) :: YTIMEDEP)
ISTATUS = NF90_GET_ATT(IFILE_ID, KVAR_ID, 'time_dependent', YTIMEDEP)
IF (istatus /= NF90_NOERR) CALL IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_GET_ATT', 'time_dependent' )
IF ( YTIMEDEP == 'yes' ) then
TPREC%TFIELD%LTIMEDEP = .TRUE.
ELSE IF ( YTIMEDEP == 'no' ) THEN
TPREC%TFIELD%LTIMEDEP = .FALSE.
ELSE
CALL PRINT_MSG(NVERB_WARNING,'IO','IO_Metadata_get_nc4','unknown value '//trim(YTIMEDEP)// &
' for time_dependent attribute' )
END IF
ISTATUS = NF90_GET_ATT(IFILE_ID, KVAR_ID, 'split_nblocks', iblocks)
IF (istatus /= NF90_NOERR) CALL IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_GET_ATT', 'split_nblocks' )
!Reset IFILE_ID to master file (if split files)
IFILE_ID = TPFILE%NNCID
!PW: todo:check tfiles_ioz exist
IFILE_ID = TPFILE%TFILES_IOZ(1)%TFILE%NNCID
ISTATUS = NF90_GET_ATT(IFILE_ID,KVAR_ID,'long_name',TPREC%TFIELD%CLONGNAME)
IF (ISTATUS /= NF90_NOERR) TPREC%TFIELD%CLONGNAME = TRIM( TPREC%TFIELD%CMNHNAME )
istatus = NF90_INQ_VARID(IFILE_ID,trim(TPREC%NAME)//'0001',ivar_id)
IF (ISTATUS /= NF90_NOERR) &
CALL IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_INQ_VARID', trim(TPREC%NAME)//'0001' )
ISTATUS = NF90_INQUIRE_VARIABLE(IFILE_ID, IVAR_ID, DIMIDS = IDIMS_ID)
IF (ISTATUS /= NF90_NOERR) &
CALL IO_Err_handle_nc4( istatus, 'IO_Metadata_get_nc4', 'NF90_INQUIRE_VARIABLE', trim(TPREC%NAME)//'0001' )
DEALLOCATE(YTIMEDEP)
ELSE IF ( YSPLIT /= 'no' ) THEN
CALL PRINT_MSG(NVERB_WARNING,'IO','IO_Metadata_get_nc4','unknown value '//trim(YSPLIT)//' for split_variable attribute' )
END IF
DEALLOCATE(YSPLIT)
END IF
ISTATUS = NF90_GET_ATT(IFILE_ID,KVAR_ID,'comment',TPREC%TFIELD%CCOMMENT)
IF (ISTATUS /= NF90_NOERR) TPREC%TFIELD%CCOMMENT = ''
ISTATUS = NF90_GET_ATT(IFILE_ID,KVAR_ID,'grid',TPREC%NGRID_FILE)
!On MesoNH versions < 5.4.0, the grid number was stored in 'GRID' instead of 'grid'
......@@ -1552,8 +1535,15 @@ END DO
END IF
IF (TPREC%LSPLIT) THEN
#if 0
IF( (.NOT.TPREC%TFIELD%LTIMEDEP .AND. TPREC%NDIMS_FILE/=2) &
.OR. ( TPREC%TFIELD%LTIMEDEP .AND. TPREC%NDIMS_FILE/=3) ) &
#else
IF( ( GSPLIT_INFO_AVAILABLE .AND. TPREC%NDIMS_FILE/=3 ) &
.OR. ( .NOT.GSPLIT_INFO_AVAILABLE .AND. &
( (.NOT.TPREC%TFIELD%LTIMEDEP .AND. TPREC%NDIMS_FILE/=2) &
.OR. ( TPREC%TFIELD%LTIMEDEP .AND. TPREC%NDIMS_FILE/=3) ) ) ) &
#endif
CALL PRINT_MSG(NVERB_FATAL,'IO','IO_Metadata_get_nc4',trim(TPREC%NAME)//': split variables can only be 3D')
!Split variables are Z-split
!Move time dimension to last (4th) position
......@@ -1596,7 +1586,7 @@ END DO
USE MODD_IO, ONLY: TFILEDATA
use mode_io_tools_nc4, only: IO_Dim_find_create_nc4, IO_Dim_find_byname_nc4
TYPE(TFILEDATA),INTENT(IN) :: TPFILE
TYPE(TFILEDATA),INTENT(INOUT) :: TPFILE
TYPE(workfield),INTENT(INOUT) :: TPREC
INTEGER, INTENT(OUT) :: KRESP
......
#MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
#MNH_LIC Copyright 1994-2025 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 version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
#MNH_LIC for details. version 1.
......@@ -54,7 +54,6 @@ cat > EXSEG1.nam << EOF
&NAM_DYNn
XTSTEP = ${XTSTEP} ,
CPRESOPT = "CRESI",
NITR = 12,
LITRADJ = T,
XRELAX = 1.,
LHORELAX_UVWTH = T,
......
&NAM_CONFZ
NB_PROCIO_W=1 ,
!MPI_BUFFER_SIZE=40
/
&NAM_PGDFILE CPGDFILE="PGD00128" /
&NAM_PGD_SCHEMES CNATURE='ISBA', CSEA='SEAFLX', CTOWN='NONE', CWATER='NONE' /
&NAM_CONF_PROJ XLAT0=-11.5, XLON0=130.7, XRPK=0., XBETA=0. /
&NAM_CONF_PROJ_GRID XLATCEN=-11.5, XLONCEN=130.7, NIMAX=128, NJMAX=128,
XDX=1600.00000, XDY=1600.00000 /
&NAM_COVER YCOVER='ECOCLIMAP_v2.0', YCOVERFILETYPE='DIRECT' /
&NAM_ZS YZS='gtopo30', YZSFILETYPE='DIRECT' /
&NAM_ISBA YCLAY='CLAY_HWSD_MOY', YCLAYFILETYPE='DIRECT',
YSAND='SAND_HWSD_MOY', YSANDFILETYPE='DIRECT' /
#!/bin/bash
#
# Modif
# J.Escobar 11/04/2014 get PGD files from 'dir_open' directory ( without psswd )
......@@ -24,7 +23,7 @@ export PGD_URL
for file in LICENSE_ECOCLIMAP.txt LICENSE_soil_data.txt \
gtopo30.dir gtopo30.hdr \
SAND_HWSD_MOY.hdr SAND_HWSD_MOY.dir CLAY_HWSD_MOY.hdr CLAY_HWSD_MOY.dir \
ECOCLIMAP_v2.0.hdr ECOCLIMAP_v2.0.dir etopo2.nc
ECOCLIMAP_v2.0.hdr ECOCLIMAP_v2.0.dir
do
[ -f $file ] || ( ${WGET} -c -nd $PGD_URL/$file.gz ; gunzip $file.gz ; )
done
......
#!/bin/bash
export MPIRUN="Mpirun -np 4"
PREP_PGD_FILES=${PREP_PGD_FILES:-"$HOME/PREP_PGD_FILES_WWW"} ; export PREP_PGD_FILES
#
if [ ! -d $PREP_PGD_FILES ]
then
cat << EOF
Your directory PREP_PGD_FILES=$PREP_PGD_FILES
containing the files gtopo30*, ECOCLIMAP_v2.0*
doesn't exist ( or was not found !!! )
use the script 'get_pgd_files' to download
this files from the MESONH WEB PAGES !!!
( or change the variable PREP_PGD_FILES ... )
After fixing it , run this script again !!!
EOF
exit 1
else
set -x
#
rm -f OUTPUT_LISTING0 pipe_name
rm -f gtopo30.??? sand_fao.??? clay_fao.???
rm -f SAND_HWSD_MOY.??? ECOCLIMAP_v2.0.??? ecoclimats_v2.???
rm -f PGD00128.*
#
ln -sf $PREP_PGD_FILES/*.dir $PREP_PGD_FILES/*.hdr .
#
time ${MPIRUN} PREP_PGD${XYZ}
fi
&NAM_CONFZ
!NB_PROCIO_R=1 ,
!NB_PROCIO_W=1 ,
!MPI_BUFFER_SIZE=40
/
&NAM_REAL_PGD
CPGD_FILE ="PGD00128" ,
LREAD_ZS =.TRUE., LREAD_GROUND_PARAM =.TRUE.
/
&NAM_DIMn_PRE NIMAX=40, NJMAX=32 /
&NAM_CONF_PRE LCARTESIAN=.FALSE.
CIDEAL='RSOU' CZS='FLAT'
NVERB=0 /
&NAM_CONFn LUSERV= T /
&NAM_LUNITn CINIFILE = "DA0128" , CINIFILEPGD = "PGD00128" /
&NAM_DYNn_PRE
CPRESOPT= 'ZRESI' ,
NITR=4 XRELAX=1. /
&NAM_LBCn_PRE CLBCX= 2*'OPEN' CLBCY= 2*'OPEN' /
&NAM_VPROF_PRE CTYPELOC='IJGRID' NILOC=1 NJLOC=1
CFUNU='ZZZ' CFUNV='ZZZ'
LGEOSBAL=.FALSE. /
&NAM_VER_GRID NKMAX=126, YZGRID_TYPE='FUNCTN',
ZDZGRD=40., ZDZTOP=210., ZZMAX_STRGRD=2500.,
ZSTRGRD=7., ZSTRTOP=7. /
&NAM_GRn_PRE
CSURF='EXTE'
! CSURF='NONE'
/
&NAM_PREP_ISBA XTG_SURF= 311., XTG_ROOT= 303., XTG_DEEP= 302.,
XHUG_SURF= 0.16, XHUG_ROOT= 0.16, XHUG_DEEP= 0.16 /
&NAM_PREP_SEAFLUX XSST_UNIF= 304. /
RSOU
2005 11 30 0
'PUVTHDMR'
0.0000000E+00
100300.0
303.3000
1.9630000E-02
92
100000.0 3.637668 -3.637668
99900.00 2.572220 -4.455216
99100.00 -4.612377 0.4035313
96600.00 5.124864 -0.4483674
93000.00 5.836996 -2.009839
92800.00 5.801031 -2.111402
92500.00 5.466062 -1.464627
85000.00 0.1345103 -1.537459
81400.00 -0.9020693 -1.849517
71800.00 -2.797467 1.304481
70000.00 -4.472232 1.198331
60500.00 -3.289776 -1.464702
59900.00 -3.208611 -1.634869
56900.00 -2.329535 -2.025034
55600.00 -2.105100 -2.257443
50100.00 -0.5325915 -1.987659
50000.00 -0.2679967 -1.519885
49500.00 0.2507798 -2.042438
46700.00 5.466062 1.464627
45300.00 5.594935 2.608961
44800.00 5.450725 2.898202
43700.00 4.994327 3.628591
42200.00 4.561049 4.891127
41900.00 4.387573 5.047325
41800.00 4.298817 5.123130
40000.00 6.305391 5.290851
39000.00 5.970908 4.027428
38600.00 5.671552 3.543979
38300.00 5.346259 3.086664
35500.00 2.976104 3.546782
32700.00 4.455215 2.572220
31400.00 3.712562 4.270814
30700.00 3.086664 5.346259
30000.00 3.540875 5.056894
28800.00 3.786532 4.205370
26700.00 3.329551 2.419061
25000.00 2.797467 1.304481
24400.00 2.819808 1.255459
23800.00 2.841289 1.206056
21400.00 3.424857 1.112804
20000.00 3.478403 0.9320353
19300.00 3.383935 1.231651
17400.00 3.411947 2.301387
15000.00 2.950729 4.214078
12700.00 2.167201 2.875973
10200.00 1.322713 1.576348
10000.00 0.4466614 2.533142
9120.000 -3.306782 3.940869
8700.000 -7.950636 2.130367
8200.000 -8.712269 0.7622259
8000.000 -9.224754 -0.8070621
7600.000 -4.009694 -2.314998
7300.000 -5.066284 -0.8933228
7000.000 -4.196201 -1.956721
6700.000 -1.013257 0.1786647
6400.000 -2.107039 1.475365
6340.000 -2.558960 1.726041
5480.000 -13.17234 2.322640
5300.000 -15.37459 1.345105
5000.000 -12.81216 -1.120920
4900.000 -12.66571 -2.233307
4860.000 -12.25463 -1.504677
4700.000 -10.76221 0.9415731
4500.000 -11.37801 7.966970
3800.000 -25.11183 2.197004
3600.000 -22.54940 -1.972818
3200.000 -22.72465 -4.417223
3000.000 -22.36116 -5.991656
2490.000 -21.48829 -2.258509
2300.000 -21.07936 -0.7361050
2200.000 -20.57776 -1.7989648E-06
2080.000 -19.00834 -0.9961855
2000.000 -17.93702 -1.569287
1600.000 -14.74927 -10.32755
1500.000 -13.52109 -6.304989
1430.000 -16.89510 -4.527030
1400.000 -18.23862 -3.215962
1300.000 -15.46941 -5.630407
1200.000 -5.594935 2.608962
1190.000 -5.671552 3.543979
1100.000 1.786646 10.13257
1050.000 -3.736842 7.333968
1020.000 -5.435582 4.725079
1000.000 -5.594935 2.608962
950.0000 -4.347303 8.176087
900.0000 2.143975 12.15908
889.9999 1.031246 11.78719
800.0000 -4.728969 4.728969
760.0000 2.890712 7.154763
710.0000 8.644947 -3.318484
700.0000 7.487652 -6.282886
600.0000 -4.214078 -2.950729
91
100000.0 303.1000 1.8050000E-02
99900.00 303.1000 1.8040001E-02
99100.00 303.1000 1.7969999E-02
96600.00 303.1000 1.7729999E-02
93000.00 303.0000 1.7370002E-02
92800.00 303.1000 1.6980000E-02
92500.00 303.2000 1.6400000E-02
85000.00 307.1000 1.1190000E-02
81400.00 309.6000 6.6700005E-03
71800.00 312.3000 6.5600001E-03
70000.00 312.9000 6.5400004E-03
60500.00 316.2000 6.1800000E-03
59900.00 318.1000 5.3400006E-03
56900.00 318.7000 4.9899998E-03
55600.00 322.2000 3.3100001E-03
50100.00 325.5000 2.6000000E-03
50000.00 325.5000 2.5800001E-03
49500.00 325.7000 3.1700002E-03
46700.00 328.6000 1.4500001E-03
45300.00 330.1000 9.4000006E-04
44800.00 330.1000 1.9600000E-03
43700.00 331.0000 2.1500003E-03
42200.00 332.2000 1.9400001E-03
41900.00 332.9000 9.6000003E-04
41800.00 333.0000 9.7000005E-04
40000.00 334.2000 1.1600000E-03
39000.00 334.6000 1.0300000E-03
38600.00 335.6000 6.5000000E-04
38300.00 335.8000 6.0000003E-04
35500.00 338.2000 2.5000001E-04
32700.00 340.8000 9.0000009E-05
31400.00 342.0000 5.0000002E-05
30700.00 342.1000 4.0000003E-05
30000.00 342.3000 4.0000003E-05
28800.00 342.3000 1.2000000E-04
26700.00 344.8000 1.0000001E-05
25000.00 345.4000 1.0000001E-05
24400.00 346.3000 2.0000001E-05
23800.00 346.4000 9.0000009E-05
21400.00 348.1000 1.0000001E-05
20000.00 348.8000 1.0000001E-05
19300.00 348.9000 2.0000001E-05
17400.00 351.5000 1.0000001E-05
15000.00 354.0000 7.1596442E-06
12700.00 355.7000 4.4376361E-06
10200.00 364.6000 1.4789329E-06
10000.00 365.4000 1.2422363E-06
9120.000 371.6000 1.2919259E-06
8700.000 379.9000 1.5496893E-06
8200.000 390.6000 1.8819877E-06
8000.000 395.1000 2.0217396E-06
7600.000 404.7000 2.3198761E-06
7300.000 412.3000 2.4844724E-06
7000.000 420.4000 2.4844724E-06
6700.000 431.1000 2.4844724E-06
6400.000 442.4000 2.4844724E-06
6340.000 444.8000 2.4844724E-06
5480.000 467.8000 2.4844724E-06
5300.000 471.0000 2.4844724E-06
5000.000 476.5000 2.4844724E-06
4900.000 477.6000 2.4844724E-06
4860.000 478.0000 2.4844724E-06
4700.000 485.1000 2.4844724E-06
4500.000 494.6000 2.4844724E-06
3800.000 532.9000 2.4844724E-06
3600.000 545.6000 2.4844724E-06
3200.000 574.4000 2.4844724E-06
3000.000 585.1000 2.4844724E-06
2490.000 624.0000 2.4844724E-06
2300.000 648.9000 2.4844724E-06
2200.000 655.4000 2.4844724E-06
2080.000 663.6000 2.4844724E-06
2000.000 673.5000 2.4844724E-06
1600.000 726.4000 2.4844724E-06
1500.000 742.5000 2.4844724E-06
1430.000 750.7000 2.4844724E-06
1400.000 759.0000 2.4844724E-06
1300.000 788.6000 2.4844724E-06
1200.000 821.7000 2.4844724E-06
1190.000 825.2000 2.4844724E-06
1100.000 833.9000 2.4844724E-06
1050.000 839.0000 2.4844724E-06
1020.000 845.3000 2.4844724E-06
1000.000 851.6000 2.4844724E-06
950.0000 877.0000 2.4844724E-06
900.0000 885.6000 2.4844724E-06
889.9999 887.3000 2.4844724E-06
800.0000 926.6000 2.4844724E-06
760.0000 946.0000 2.4844724E-06
710.0000 958.0000 2.4844724E-06
700.0000 963.1000 2.4844724E-06
600.0000 20.30000 2.4844724E-06
#!/bin/bash
NP=${NP:-16}
NPS=${NPS:-4}
export ACC_DEVICE_TYPE=HOST
export MPIRUN="Mpirun -tag-output -report-bindings --mca mpi_cuda_support 0 -map-by ppr:${NPS}:socket -bind-to none -np ${NP} set_core_device_impair"
#
set -x
set -e
#
rm -f OUTPUT_LISTING1 pipe_name file_for_xtransfer
rm -f PGD00128.*
rm -f DA0128.*
#
ln -sf ../001_pgd1/PGD00128.* .
#
time ${MPIRUN} PREP_IDEAL_CASE${XYZ}
#
&NAM_CONFZ
! NB_PROCIO_R=1 ,
! NB_PROCIO_W=1 ,
LMNH_MPI_BSEND = F ,
LMNH_MPI_ALLTOALLV_REMAP=T
! MPI_BUFFER_SIZE = 40
/
&NAM_LUNITn CINIFILE = "DA0128" , CINIFILEPGD = "PGD00128" /
&NAM_CONFn LUSERV = T, LUSERC = T, LUSERR = T, LUSERI = T,
LUSERS = T, LUSERG = T, LUSERH = F, LUSECI = T /
&NAM_DYNn XTSTEP = 10.00000 ,
CPRESOPT = "ZRESI", NITR = 12
!CPRESOPT = "ZSOLV", NITR = 12
XRELAX = 1., LHORELAX_UVWTH = T, LHORELAX_RV = T, LVE_RELAX = T,
NRIMX = 6, NRIMY = 6, XRIMKMAX = 0.0005, XT4DIFU = 4000 /
&NAM_ADVn CUVW_ADV_SCHEME = "WENO_K", CMET_ADV_SCHEME = "PPM_01",
CSV_ADV_SCHEME = "PPM_01" /
&NAM_PARAMn CTURB = "TKEL" ! "NONE" ! "TKEL",
CRAD = "ECMW",
CCLOUD = "ICE3" ! "NONE" ! "ICE3",
CDCONV = "NONE", CSCONV = "NONE" /
&NAM_PARAM_ICEn CSUBG_AUCV_RC = "NONE",
LRED = F
/
&NAM_PARAM_RADn XDTRAD = 1800., XDTRAD_CLONLY = 1800., LCLEAR_SKY = F,
NRAD_COLNBR = 40 /
&NAM_PARAM_MFSHALLn XIMPL_MF = 1, CMF_UPDRAFT = "EDKF", CMF_CLOUD = "NONE",
LMIXUV = T, LMF_FLX = F /
&NAM_LBCn CLBCX = 2*"OPEN", CLBCY = 2*"OPEN", XCPHASE = 20. /
&NAM_TURBn XIMPL = 1., CTURBLEN = "DEAR", CTURBDIM = "3DIM",
LTURB_FLX = F, LTURB_DIAG = F,
LSIG_CONV = F /
&NAM_CH_MNHCn /
&NAM_CONF CCONF = "START", LFLAT = F, CEQNSYS = "DUR",
LLG=F, NMODEL = 1, NVERB = 0, CEXP = "D0128",
CSEG = "DAR01", CSPLIT = "BSPLITTING"
NHALO=1
/
&NAM_DYN XSEGLEN = 14400.0000 ! 150. ! 14400.0000 , LCORIO = T,
LNUMDIFU = F, LNUMDIFTH = F,
XALKTOP = 0.001, XALZBOT = 22000. /
&NAM_BLANK /
&NAM_NESTING /
&NAM_BACKUP
XBAK_TIME(1,1) = 3600.00000 ! 150. ! 3600.00000
XBAK_TIME(1,2) = 7200.00000
XBAK_TIME(1,3) = 10800.0000
XBAK_TIME(1,4) = 14400.0000
XBAK_TIME(1,5) = 18000.0000
XBAK_TIME(1,6) = 21600.0000
/
&NAM_ISBAn /
&NAM_SEAFLUXn /
&NAM_DIAG_SURFn LSURF_BUDGET=T /
&NAM_DIAG_ISBAn /
&NAM_DIAG_SURF_ATMn /
&NAM_NEBn LSIGMAS = F, LSUBG_COND = F /
! *********************************************************************
! *********************************************************************
! ** **
! ** Parameter file for geometric multigrid code **
! ** **
! *********************************************************************
! *********************************************************************
!
! *********************************************************************
! * General parameters
! *********************************************************************
&parameters_general
savefields = .F. ! Save fields to disk?
/
! *********************************************************************
! * General solver parameters
! *********************************************************************
&parameters_solver
LUseO = F ,
LUseT = T ,
solvertype = 1, ! Solver type:
! 1 : Richardson iteration
! 2 : Conjugate gradient
resreduction = 1e-1 ! 1.0d-10 ! Required relative residual reduction
maxiter = 5 ! 50 ! Maximal number of iterations
/
! *********************************************************************
! * Conjugate gradient parameters
! *********************************************************************
&parameters_conjugategradient
verbose = 10, ! Verbosity level
maxiter = 5, ! Maximal number of iterations
resreduction = 1.0e-1, ! Target residual reduction
n_prec = 1 ! Number of smoother applications in
! preconditioner (N.B.: Using 0 is
! inefficient, as the identity is used
! for preconditioning, instead of using
! unpreconditioned CG.)
/
! *********************************************************************
! * Grid parameters
! *********************************************************************
&parameters_grid
n = 128 , ! 64, ! Number of horizontal grid cells
nz = 72, ! Number of vertical grid cells
L = 204800.0 ! 16000.0 metre * 256 pt grille ! 1.0, ! Size in horizontal direction
H = 19200.0 ! 150.0 metre * 128 niveaux ! 0.01, ! Size in vertical direction
vertbc = 2, ! Boundary conditions at top and bottom of the
! atmosphere. 1 = DIRICHLET, 2 = NEUMANN
! Note that Neumann boundary conditions only work
! for coarsening in the horizontal only, as they are
! not yet implemented in the prolongation operator.
graded = .F. ! Is the grid graded in the vertical direction?
/
! *********************************************************************
! * Parallel communication parameters
! *********************************************************************
&parameters_communication
halo_size = 1 ! Size of halos (has to be 1 or 2)
/
! *********************************************************************
! * Model parameters
! *********************************************************************
!
! parameters of the Helmholtz operator
!
! -omega2*(d^2/dy^2 + d^2/dy^2 + lambda2*d^2/dz^2) u + delta u = RHS
!
&parameters_model
omega2 = 1.0,
lambda2 = 1.0 ! 100.0, ! Vertical coupling
delta = 0.0d0 ! Size of constant term
/
! *********************************************************************
! * Smoother parameters
! *********************************************************************
!
! parameters of the smoother
!
&parameters_smoother
smoother = 6, ! Smoother method
! 3 = line SOR
! 4 = line SSOR
! 6 = line Jacobi
ordering = 2, ! Ordering of grid points (for smoother)
! 1 = lexicographic
! 2 = red-black ordering
!rho = 0.6666666666666666d0 ! Overrelaxation parameter
rho = 0.8d0 ! Overrelaxation parameter
/
! *********************************************************************
! * Multigrid parameters
! *********************************************************************
&parameters_multigrid
verbose = 10, ! Verbosity level
n_lev = 8, ! Number of levels
iswitch_cpu_gpu = 100 ! /!\ =100 deactive switch cpu <-> gpu computation | work only with MANAGED Memory + nvhpc
lev_split = 3, ! First level where data is pulled together
n_presmooth = 1, ! Number of presmoothing steps
n_postsmooth = 1, ! Number of postsmoothing steps
n_coarsegridsmooth = 1, ! Number of smoothing steps on coarsest level
prolongation = 2 ! 2 best after modif !! ! Prologation method
! 1 = constant interpolation
! 2 = (tri-) linear interpolation
restriction = 1, ! Restriction method
! 1 = cell average
! 2 = Khalil
coarsegridsolver = 1 ! Solver on coarsest grid
! 1 = use smoother
! 2 = Conjugate gradient
/
#export PGI_ACC_POOL_ALLOC=0
export PGI_ACC_SYNCHRONOUS=1
NP=${NP:-16}
NPS=${NPS:-4}
export MPIRUN=${MPIRUN:-"Mpirun -tag-output -bind-to none -map-by ppr:${NPS}:socket -x PGI_ACC_POOL_ALLOC -x PGI_ACC_SYNCHRONOUS -np ${NP} set_core_device_impair "}
#
set -x
set -e
#
rm -f DA0128.*
rm -f PGD00128.*
rm -f D0128.1.DAR01.* OUTPUT_LISTING* pipe_name
#
ln -sf ../001_pgd1/PGD00128.{des,nc} .
ln -sf ../002_prep_ideal_case/DA0128.{des,nc} .
#
time ${MPIRUN} MESONH${XYZ}
&NAM_CONFIO
LIO_ALLOW_NO_BACKUP = T , LIO_NO_WRITE = T
/
&NAM_CONFZ
! NB_PROCIO_R=1 ,
! NB_PROCIO_W=1 ,
LMNH_MPI_BSEND = F ,
LMNH_MPI_ALLTOALLV_REMAP=T
! MPI_BUFFER_SIZE = 40
!NZ_PROC=1
/
&NAM_LUNITn CINIFILE = "D0128.1.DAR01.004" , CINIFILEPGD = "PGD00128" /
&NAM_CONFn LUSERV = T, LUSERC = T, LUSERR = T, LUSERI = T,
LUSERS = T, LUSERG = T, LUSERH = F, LUSECI = T /
&NAM_DYNn XTSTEP = 10.00000 ,
CPRESOPT = "ZRESI",
!CPRESOPT = "ZSOLV",
NITR = 12,
XRELAX = 1., LHORELAX_UVWTH = T, LHORELAX_RV = T, LVE_RELAX = T,
NRIMX = 6, NRIMY = 6, XRIMKMAX = 0.0005, XT4DIFU = 4000 /
&NAM_ADVn CUVW_ADV_SCHEME = "WENO_K", CMET_ADV_SCHEME = "PPM_01",
CSV_ADV_SCHEME = "PPM_01" /
&NAM_PARAMn CTURB = "TKEL", ! "NONE" , ! "TKEL",
CRAD = "ECMWF",
CCLOUD = "ICE3", ! "NONE" , ! "ICE3",
CDCONV = "NONE", CSCONV = "NONE" /
&NAM_PARAM_ICEn CSUBG_AUCV_RC = "NONE",
LRED = F
/
&NAM_PARAM_RADn XDTRAD = 1800., XDTRAD_CLONLY = 1800., LCLEAR_SKY = F,
NRAD_COLNBR = 40 /
&NAM_PARAM_MFSHALLn XIMPL_MF = 1, CMF_UPDRAFT = "EDKF", CMF_CLOUD = "NONE",
LMIXUV = T, LMF_FLX = F /
&NAM_LBCn CLBCX = 2*"OPEN", CLBCY = 2*"OPEN", XCPHASE = 20. /
&NAM_TURBn XIMPL = 1., CTURBLEN = "DEAR", CTURBDIM = "3DIM",
LTURB_FLX = F, LTURB_DIAG = F,
LSIG_CONV = F /
&NAM_CH_MNHCn /
&NAM_CONF CCONF = "RESTA", LFLAT = F, CEQNSYS = "DUR",
LLG=F, NMODEL = 1, NVERB = 0, CEXP = "D0128",
CSEG = "DAR02", CSPLIT = "BSPLITTING"
NHALO=1
LCHECK = F /
&NAM_DYN XSEGLEN = 1000.0 ! 150.0000 ,
LCORIO = T,
LNUMDIFU = F, LNUMDIFTH = F,
XALKTOP = 0.001, XALZBOT = 22000. /
&NAM_BLANK /
&NAM_NESTING /
&NAM_BACKUP
XBAK_TIME(1,1) = 150.0 ! 3600.00000 ! 75. ! 3600.00000
XBAK_TIME(1,2) = 7200.00000
XBAK_TIME(1,3) = 10800.0000
XBAK_TIME(1,4) = 14400.0000
XBAK_TIME(1,5) = 18000.0000
XBAK_TIME(1,6) = 21600.0000
/
&NAM_ISBAn /
&NAM_SEAFLUXn /
&NAM_DIAG_SURFn LSURF_BUDGET=T /
&NAM_DIAG_ISBAn /
&NAM_DIAG_SURF_ATMn /
&NAM_NEBn LSIGMAS = F, LSUBG_COND = F /
#!/bin/bash
export ACC_DEVICE=HOST
ACC_DEVICE_TYPE=${ACC_DEVICE}
exec /home/escj/DEV/MNH-55X-dev-OPENACC-juan-03/src/dir_obj-LXnvhpc2005-R8I4-MNH-V5-4-2-MPIAUTO-${OPTLEVEL}/ZSOLVER/MESONH
&NAM_MPPDB
MPPDB_DEBUG = .F. ,
MPPDB_NBSON = 1 ,
MPPDB_EXEC = "/home/escj/DEV/MNH-55X-dev-OPENACC-juan-03/MY_RUN/BENCH/CINES_MNH55X/004_Hector_128x128_MNH-55X/004_mesonh_step2/MESONH_HOST2005" ,
MPPDB_WDIR = "/home/escj/DEV/MNH-55X-dev-OPENACC-juan-03/MY_RUN/BENCH/CINES_MNH55X/004_Hector_128x128_MNH-55X/004_mesonh_step2/dir_clone" ,
MPPDB_CHECK_LB = .F.
/
! *********************************************************************
! *********************************************************************
! ** **
! ** Parameter file for geometric multigrid code **
! ** **
! *********************************************************************
! *********************************************************************
!
! *********************************************************************
! * General parameters
! *********************************************************************
&parameters_general
savefields = .F. ! Save fields to disk?
/
! *********************************************************************
! * General solver parameters
! *********************************************************************
&parameters_solver
LUseO = F ,
LUseT = T ,
solvertype = 1, ! Solver type:
! 1 : Richardson iteration
! 2 : Conjugate gradient
resreduction = 1e-1 ! 1.0d-10 ! Required relative residual reduction
maxiter = 5 ! 50 ! Maximal number of iterations
/
! *********************************************************************
! * Conjugate gradient parameters
! *********************************************************************
&parameters_conjugategradient
verbose = 10, ! Verbosity level
maxiter = 5, ! Maximal number of iterations
resreduction = 1.0e-1, ! Target residual reduction
n_prec = 1 ! Number of smoother applications in
! preconditioner (N.B.: Using 0 is
! inefficient, as the identity is used
! for preconditioning, instead of using
! unpreconditioned CG.)
/
! *********************************************************************
! * Grid parameters
! *********************************************************************
&parameters_grid
n = 128 , ! 64, ! Number of horizontal grid cells
nz = 72, ! Number of vertical grid cells
L = 204800.0 ! 16000.0 metre * 256 pt grille ! 1.0, ! Size in horizontal direction
H = 19200.0 ! 150.0 metre * 128 niveaux ! 0.01, ! Size in vertical direction
vertbc = 2, ! Boundary conditions at top and bottom of the
! atmosphere. 1 = DIRICHLET, 2 = NEUMANN
! Note that Neumann boundary conditions only work
! for coarsening in the horizontal only, as they are
! not yet implemented in the prolongation operator.
graded = .F. ! Is the grid graded in the vertical direction?
/
! *********************************************************************
! * Parallel communication parameters
! *********************************************************************
&parameters_communication
halo_size = 1 ! Size of halos (has to be 1 or 2)
/
! *********************************************************************
! * Model parameters
! *********************************************************************
!
! parameters of the Helmholtz operator
!
! -omega2*(d^2/dy^2 + d^2/dy^2 + lambda2*d^2/dz^2) u + delta u = RHS
!
&parameters_model
omega2 = 1.0,
lambda2 = 1.0 ! 100.0, ! Vertical coupling
delta = 0.0d0 ! Size of constant term
/
! *********************************************************************
! * Smoother parameters
! *********************************************************************
!
! parameters of the smoother
!
&parameters_smoother
smoother = 6, ! Smoother method
! 3 = line SOR
! 4 = line SSOR
! 6 = line Jacobi
ordering = 2, ! Ordering of grid points (for smoother)
! 1 = lexicographic
! 2 = red-black ordering
!rho = 0.6666666666666666d0 ! Overrelaxation parameter
rho = 0.8d0 ! Overrelaxation parameter
/
! *********************************************************************
! * Multigrid parameters
! *********************************************************************
&parameters_multigrid
verbose = 10, ! Verbosity level
n_lev = 8, ! Number of levels
iswitch_cpu_gpu = 100 ! /!\ =100 deactive switch cpu <-> gpu computation | work only with MANAGED Memory + nvhpc
lev_split = 3, ! First level where data is pulled together
n_presmooth = 1, ! Number of presmoothing steps
n_postsmooth = 1, ! Number of postsmoothing steps
n_coarsegridsmooth = 1, ! Number of smoothing steps on coarsest level
prolongation = 2 ! 2 best after modif !! ! Prologation method
! 1 = constant interpolation
! 2 = (tri-) linear interpolation
restriction = 1, ! Restriction method
! 1 = cell average
! 2 = Khalil
coarsegridsolver = 1 ! Solver on coarsest grid
! 1 = use smoother
! 2 = Conjugate gradient
/
#!/bin/bash
#
#
set -x
#export PGI_ACC_POOL_ALLOC=0
export PGI_ACC_SYNCHRONOUS=1
#export NVCOMPILER_ACC_POOL_ALLOC=0
NP=${NP:-16}
NPS=${NPS:-4}
export MPIRUN=${MPIRUN:-"Mpirun -tag-output -report-bindings -bind-to none -map-by ppr:${NPS}:socket -x NVCOMPILER_ACC_POOL_ALLOC_MAXSIZE -x NVCOMPILER_ACC_POOL_ALLOC -x PGI_ACC_POOL_ALLOC -x PGI_ACC_SYNCHRONOUS -np ${NP} set_core_device_impair "}
rm -f DA0128.*
rm -f PGD00128.*
rm -f D0128.1.DAR0?.* OUTPUT_LISTING1 pipe_name
#
ln -sf ../001_pgd1/PGD00128.* .
ln -sf ../002_prep_ideal_case/DA0128.* .
ln -sf ../003_mesonh_step1/D0128.1.DAR0?.* .
#
time ${MPIRUN} MESONH${XYZ}
#!/bin/bash
#
#
set -x
DIRCLONE=dir_clone
mkdir -p ${DIRCLONE}
export PGI_ACC_POOL_ALLOC=0
#export PGI_ACC_POOL_SIZE=100MB
export NP=${NP:-1}
export MPIRUN=${MPIRUN:-Mpirun -tag-output -np ${NP}}
#export PGI_ACC_NOTIFY=$(( 1+2+4+8+16+32 )) PGI_ACC_DEBUG=$(( 1+2+4+8+16+32 ))
#export PGI_ACC_TIME=1
export PGI_ACC_SYNCHRONOUS=1
(
cd ${DIRCLONE}
#
rm -f DA0128.*
rm -f PGD00128.*
rm -f D0128.1.DAR0?.* OUTPUT_LISTING1 pipe_name
#
cp ../EXSEG1.nam .
ln -sf ../../001_pgd1/PGD00128.* .
ln -sf ../../002_prep_ideal_case/DA0128.* .
ln -sf ../../003_mesonh_step1/D0128.1.DAR01.* .
#
)
#
rm -f DA0128.*
rm -f PGD00128.*
rm -f D0128.1.DAR0?.* OUTPUT_LISTING1 pipe_name
#
ln -sf ../001_pgd1/PGD00128.* .
ln -sf ../002_prep_ideal_case/DA0128.* .
ln -sf ../003_mesonh_step1/D0128.1.DAR0?.* .
#
killall -r 'MESONH.*'
time ${MPIRUN} MESONH${XYZ}
../004_mesonh_step2/parameters_mg.nam
\ No newline at end of file