diff --git a/MY_RUN/KTEST/004_Reunion/003_mesonh/run_mesonh_xyz b/MY_RUN/KTEST/004_Reunion/003_mesonh/run_mesonh_xyz index ce9bd3dc383068a96cab69ce6d6391bc1cd8926e..a7a52d5318cfbcbda9146263dc1c2b07d2ba295c 100755 --- a/MY_RUN/KTEST/004_Reunion/003_mesonh/run_mesonh_xyz +++ b/MY_RUN/KTEST/004_Reunion/003_mesonh/run_mesonh_xyz @@ -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 diff --git a/MY_RUN/KTEST/004_Reunion/004_diag/run_diag_xyz b/MY_RUN/KTEST/004_Reunion/004_diag/run_diag_xyz index 4f3502cb1f6807a798046f0c61824606e20372f6..a14520746231626dfb6e8e3a7a9ebca91b0c9e65 100755 --- a/MY_RUN/KTEST/004_Reunion/004_diag/run_diag_xyz +++ b/MY_RUN/KTEST/004_Reunion/004_diag/run_diag_xyz @@ -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} diff --git a/MY_RUN/KTEST/007_16janvier/008_run2/run_mesonh_xyz b/MY_RUN/KTEST/007_16janvier/008_run2/run_mesonh_xyz index 77692f0f6cc8be019f7463931b40a9ed79072b3d..e82b13a488c3483b41efbe28899e1855fc93f306 100755 --- a/MY_RUN/KTEST/007_16janvier/008_run2/run_mesonh_xyz +++ b/MY_RUN/KTEST/007_16janvier/008_run2/run_mesonh_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 diff --git a/MY_RUN/KTEST/007_16janvier/009_diag/run_diag_xyz b/MY_RUN/KTEST/007_16janvier/009_diag/run_diag_xyz index 27ffa99ea871b2f79b7d149dc36073667afa399b..ef961876a3a4c209f5f455058f0e1c74ebce364c 100755 --- a/MY_RUN/KTEST/007_16janvier/009_diag/run_diag_xyz +++ b/MY_RUN/KTEST/007_16janvier/009_diag/run_diag_xyz @@ -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 diff --git a/src/MNH/read_albedo_data.f90 b/src/MNH/read_albedo_data.f90 new file mode 100644 index 0000000000000000000000000000000000000000..0409608c8960b5284a0b7a3932e157f624980203 --- /dev/null +++ b/src/MNH/read_albedo_data.f90 @@ -0,0 +1,64 @@ +!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 + diff --git a/src/MNH/read_emiss_data.f90 b/src/MNH/read_emiss_data.f90 new file mode 100644 index 0000000000000000000000000000000000000000..ba95430aa53fe1c8ecd0a6d7aeffe6e2db0ba4c2 --- /dev/null +++ b/src/MNH/read_emiss_data.f90 @@ -0,0 +1,63 @@ +!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 +