Skip to content
Snippets Groups Projects
Commit 8572be42 authored by Juan Escobar's avatar Juan Escobar
Browse files

Juan 18/06/2021: ECRAD-1.4.0 , add new MNH source read_albedo_data.f90,read_emiss_data.f90

parent ce5be8c1
No related branches found
No related tags found
No related merge requests found
......@@ -10,8 +10,8 @@ ln -fs ../002_prep_ideal_case/REUNION_IDEA*.{des,lfi,nc} .
ln -sf ../001_prep_pgd/REUNION_PGD_1km5.{des,lfi,nc} .
if [ "x${MNH_ECRAD}" != "x" ] ; then
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.0.1/data/RAD* .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.0.1/data/*.nc .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/RAD* .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/*.nc .
sed -e's/ECMW/ECRA/g' EXSEG1.nam.src > EXSEG1.nam
else
cp EXSEG1.nam.src EXSEG1.nam
......
......@@ -11,5 +11,10 @@ rm -f KWRAI* OUT*
ln -sf ../003_mesonh/REUNI.1.00A20.004.* .
ln -sf ../001_prep_pgd/REUNION_PGD_1km5.* .
if [ "x${MNH_ECRAD}" != "x" ] ; then
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/RAD* .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/*.nc .
fi
time ${MPIRUN} DIAG${XYZ}
......@@ -14,8 +14,8 @@ ln -sf ../003_nest/16JAN98_36km.neste1.{des,lfi,nc} .
ln -sf ../003_nest/16JAN98_9km.neste1.{des,lfi,nc} .
if [ "x${MNH_ECRAD}" != "x" ] ; then
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.0.1/data/RAD* .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.0.1/data/*.nc .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/RAD* .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/*.nc .
sed -e's/ECMW/ECRA/g' EXSEG1.nam.src > EXSEG1.nam
sed -e's/ECMW/ECRA/g' EXSEG2.nam.src > EXSEG2.nam
else
......
......@@ -14,8 +14,8 @@ ln -sf ../003_nest/16JAN98_9km.neste1.* .
ln -sf ../003_nest/16JAN98_36km.neste1.* .
if [ "x${MNH_ECRAD}" != "x" ] ; then
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.0.1/data/RAD* .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-1.0.1/data/*.nc .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/RAD* .
ln -sf ${SRC_MESONH}/src/LIB/RAD/ecrad-${VERSION_ECRAD}/data/*.nc .
fi
cp DIAG1.nam1 DIAG1.nam
......
!MNH_LIC Copyright 1994-2019 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.
!-----------------------------------------------------------------
! ######################
MODULE MODI_READ_ALBEDO_DATA
! ######################
!
USE MODD_PARAM_ECRAD_n, ONLY : USER_ALB_DIFF, USER_ALB_DIR
implicit none
CONTAINS
SUBROUTINE READ_ALBEDO_DATA(SURF_TYPE)
use easy_netcdf, only : netcdf_file
use radiation_config, only: get_enum_code
character(len=*), intent(in) :: SURF_TYPE
!enum, bind(c)
! enumerator IAlbedoSnow, &
! & IAlbedoGrass
!end enum
character(len=*), parameter :: AlbedoModelName(0:5) = (/ 'OCEA', &
& 'VEGE',&
& 'DESE',&
& 'SNOW',&
& 'ZERO',&
& 'UNIT' /)
type(netcdf_file) :: file
character(len=255) :: albedo_data_name
integer :: NALB
real, allocatable :: ALL_ALB_DIFF(:,:)
real, allocatable :: ALL_ALB_DIR(:,:)
albedo_data_name = '/home/liboisq/MesoNH/MNH-V5-4-4/src/QUENTIN/ecrad-1.4.0/data/spectral_albedo.nc'
! Determine albedo model
call get_enum_code(SURF_TYPE, AlbedoModelName, &
& ' ', NALB)
! Open the file and configure the way it is read
call file%open(trim(albedo_data_name), iverbose=1)
call file%transpose_matrices()
! Read the albedos
call file%get_real_matrix('albedo_diff', ALL_ALB_DIFF)
call file%get_real_matrix('albedo_dir', ALL_ALB_DIR)
USER_ALB_DIFF(:) = ALL_ALB_DIFF(NALB+1,:) ! because index starts at 0
USER_ALB_DIR(:) = ALL_ALB_DIR(NALB+1,:)
call file%close()
END SUBROUTINE READ_ALBEDO_DATA
END MODULE MODI_READ_ALBEDO_DATA
!MNH_LIC Copyright 1994-2019 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.
!-----------------------------------------------------------------
! ######################
MODULE MODI_READ_EMISS_DATA
! ######################
!
USE MODD_PARAM_ECRAD_n, ONLY : USER_EMISS
implicit none
CONTAINS
!
SUBROUTINE READ_EMISS_DATA(SURF_TYPE)
!
use easy_netcdf, only : netcdf_file
use radiation_config, only: get_enum_code
character(len=*), intent(in) :: SURF_TYPE
character(len=*), parameter :: EmissModelName(0:5) = (/ 'OCEA', &
& 'VEGE',&
& 'DESE',&
& 'SNOW',&
& 'ZERO',&
& 'UNIT' /)
type(netcdf_file) :: file
character(len=255) :: emiss_data_name
integer :: NEMISS
real, allocatable :: ALL_EMISS(:,:)
emiss_data_name = '/home/liboisq/MesoNH/MNH-V5-4-4/src/QUENTIN/ecrad-1.4.0/data/spectral_emissivity.nc'
! Determine emissivity model
call get_enum_code(SURF_TYPE, EmissModelName, &
& ' ', NEMISS)
! Open the file and configure the way it is read
call file%open(trim(emiss_data_name), iverbose=1)
call file%transpose_matrices()
! Read the emissivities
call file%get_real_matrix('emissivity', ALL_EMISS)
USER_EMISS(:) = ALL_EMISS(NEMISS+1,:)
call file%close()
END SUBROUTINE READ_EMISS_DATA
END MODULE MODI_READ_EMISS_DATA
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment