- Timestamp:
- Jun 25, 2024, 4:52:40 PM (6 months ago)
- Location:
- BOL/LMDZ_Setup_amaury
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/LMDZ_Setup_amaury/DEF/namelist_ecrad
r4615 r4993 6 6 ! 7 7 &radiation_driver 8 do_parallel = true, ! Use OpenMP parallelization? 9 nblocksize = 8, ! Number of columns to process per thread 10 11 ! Verbosity level: 0=none, 1=warning, 2=info, 3=progress, 4=detailed, 5=debug 12 iverbose = 5, 13 14 fractional_std=1., ! (-) vertically constant fractional standard deviation of in-cloud liquid water [0, 3] *0.75* 15 overlap_decorr_length=1000, ! (m) vertically constant overlap decorrelation length [0, 5000] *2000* 16 ! following Hogan and Illingworth 2000, if overlap_scheme_name=="Exp-Ran" 8 ok_effective_size=false, ! Cloud effective size taken into account for SPARTACUS solver if true 9 ok_separation=true, ! Cloud separation scale taken into account for SPARTACUS solver if true 10 frac_std=1., ! (-) vertically constant fractional standard deviation of in-cloud liquid water [0, 3] *0.75* 11 overlap_decorr_length=2000, ! (m) vertically constant overlap decorrelation length [0, 5000] *2000* 12 ! following Hogan and Illingworth 2000, if overlap_scheme_name=="Exp-Ran" 17 13 ! Ctrue(i,j) = a*Cmax(i,j) + (1-a)*Crand(i,j) ; a = exp(DZ(i,j)/overlap_decorr_length) 18 high_inv_effective_size = 0.0001 ! (m-1) override input profile [e-6, e-3] *e-4* 19 middle_inv_effective_size = 0.0001 ! (m-1) override input profile [e-6, e-3] *e-4* 20 low_inv_effective_size = 0.005 ! (m-1) override input profile [e-5, e-2] *e-3* 21 effective_size_scaling = 1.0, ! (-) scale effective size 22 23 !sw_albedo = 0.2, ! (-) override shortwave albedo, no default [0,1] 24 !lw_emissivity = 1.0, ! (-) override longwave emissivity, no default [0,1] 25 26 q_liquid_scaling = 1., ! (-) scale liquid water content input profile 27 q_ice_scaling = 1., ! (-) scale ice water content input profile 28 cloud_fraction_scaling = 1., ! (-) scale cloud fraction input profile 29 30 overlap_decorr_length_scaling=1., ! (-) scale overlap decorrelation length 31 32 !skin_temperature = 294.2, ! (K) override skin temperature from input file, no default 33 !cos_solar_zenith_angle = .5, ! (-) override cos solar zenith angle from input file, no default 34 35 !solar_irradiance_override= 1368.143, ! (Wm-2) override total solar irradiance, default value is 1366.0 14 high_inv_effective_size = 0.0001, ! (m-1) override input profile [e-6, e-3] *e-4* 15 middle_inv_effective_size = 0.0001, ! (m-1) override input profile [e-6, e-3] *e-4* 16 low_inv_effective_size = 0.005, ! (m-1) override input profile [e-5, e-2] *e-3* 17 cloud_separation_scale_toa = 14000.0, 18 cloud_separation_scale_surface = 2500.0, 19 cloud_separation_scale_power = 3.5, 20 cloud_inhom_separation_factor = 0.75, 36 21 / 37 22 … … 41 26 ! 42 27 &radiation 43 do_lw = true,44 do_sw_direct = true,45 do_3d_effects = true, ! Represent 3D effects?46 do_lw_side_emissivity = true,47 do_3d_lw_multilayer_effects = true,48 directory_name="/gpfsstore/rech/gzi/rdzt896/TEST_PRODtesting4581/ecrad_data", 28 do_lw = true, 29 do_sw_direct = true, 30 do_3d_effects = true, ! Represent 3D effects? 31 do_lw_side_emissivity = true, 32 do_3d_lw_multilayer_effects = true, 33 directory_name = "data", ! Location of configuration files 49 34 50 liquid_model_name = "SOCRATES", ! Liquid droplet scattering model: "Monochromatic", "HuStamnes", *"SOCRATES"*, "Slingo"51 ice_model_name = "Fu-IFS", ! Ice particle scattering model: "Monochromatic", "Fu-PSRAD", "Fu-IFS", *"Baran"*, "Baran2016", "Baran2017", "Yi"52 cloud_pdf_shape_name = "Gamma", ! To describe liquid water horizontal distribution: *"Gamma"*, "Lognormal"35 liquid_model_name = "SOCRATES", ! Liquid droplet scattering model: "Monochromatic", "HuStamnes", *"SOCRATES"*, "Slingo" 36 ice_model_name = "Fu-IFS", ! Ice particle scattering model: "Monochromatic", "Fu-PSRAD", "Fu-IFS", *"Baran"*, "Baran2016", "Baran2017", "Yi" 37 cloud_pdf_shape_name = "Gamma", ! To describe liquid water horizontal distribution: *"Gamma"*, "Lognormal" 53 38 54 sw_solver_name = "Tripleclouds", ! Solver: "Homogeneous", *"McICA"*, "SPARTACUS", "Tripleclouds"55 lw_solver_name = "Tripleclouds", ! enable 3D effects56 sw_encroachment_name = "Computed", ! "Maximum" = old behaviour (also "Minimum"/*"Computed"*)57 overlap_scheme_name = "Exp-Ran", ! Cloud overlap: *"Exp-Ran"*, "Max-Ran", "Exp-Exp"39 sw_solver_name = "Tripleclouds", ! Solver: "Homogeneous", *"McICA"*, "SPARTACUS", "Tripleclouds" 40 lw_solver_name = "Tripleclouds", ! enable 3D effects 41 sw_encroachment_name = "Computed", ! "Maximum" = old behaviour (also "Minimum"/*"Computed"*) 42 overlap_scheme_name = "Exp-Ran", ! Cloud overlap: *"Exp-Ran"*, "Max-Ran", "Exp-Exp" 58 43 59 overhead_sun_factor = 0.06,60 do_lw_cloud_scattering = true, ! Clouds scatter in the longwave?61 do_lw_aerosol_scattering= true, ! Aerosols scatter in the longwave?62 cloud_inhom_decorr_scaling = 0.5,63 do_save_radiative_properties = false, ! Save raw radiation properties in radiative_properties.nc?44 overhead_sun_factor = 0.06, 45 do_lw_cloud_scattering = true, ! Clouds scatter in the longwave? 46 do_lw_aerosol_scattering= true, ! Aerosols scatter in the longwave? 47 cloud_inhom_decorr_scaling = 0.5, 48 do_save_radiative_properties = false, ! Save raw radiation properties in radiative_properties.nc? 64 49 65 50 ! Verbosity level: 0=none, 1=warning, 2=info, 3=progress, 4=detailed, 5=debug 66 iverbose = 1, 67 use_aerosols = false, ! Include aerosols in radiation calculations? 68 n_aerosol_types = 12, 69 do_save_spectral_flux = false, ! Save spectral fluxes in output file? 70 do_save_gpoint_flux = false, ! Save fluxes per g-point in output file? 71 gas_model_name = "RRTMG-IFS", ! Gas model: "Monochromatic", *"RRTMG-IFS"*, "RRTMG-PSRAD" 51 iverbose = 1, 52 use_aerosols = false, ! Include aerosols in radiation calculations? 53 n_aerosol_types = 13, 54 !aerosol_optics_override_file_name = "aer_opt_LMDZ_ECCKD.nc", 55 !aerosol_optics_override_file_name = "aer_opt_LMDZ_RRTMG.nc", 56 do_save_spectral_flux = false, ! Save spectral fluxes in output file? 57 do_save_gpoint_flux = false, ! Save fluxes per g-point in output file? 58 gas_model_name = "ECCKD", ! Gas model: "Monochromatic", "RRTMG-IFS", "ECCKD" 72 59 / -
BOL/LMDZ_Setup_amaury/era2gcm_tuto.sh
r4751 r4993 4 4 # 5 5 # Script for interpolating monthly ERA* files to the LMDZ grid; 6 # it creates the folder structure required by the tutorial_prodscripts6 # it creates the folder structure required by the LMDZ_Setup scripts 7 7 # 8 8 # NB: for "cleanest" guiding, the 1st step of the next month should be added at the end of each month. … … 12 12 # 13 13 #----------------------------------------------------------------------------- 14 # Requires : netcdf, ferret, nco 15 #----------------------------------------------------------------------------- 16 module load netcdf/4.7.2-mpi-cuda ferret nco cdo14 # Requires : netcdf, ferret, nco, cdo 15 #----------------------------------------------------------------------------- 16 #@JZ module load netcdf/4.7.2-mpi-cuda ferret nco cdo 17 17 # 18 18 # Check&modify section "User choices", then run the script with ./era2gcm.sh 19 19 #----------------------------------------------------------------------------- 20 20 # ATTENTION : VERIFIEZ 21 # --> l'acc es (repositoire ou telechargement) a la reanalyse ERA souhaitee (variable ANA_DIR)21 # --> l'accès (repositoire ou telechargement) a la réanalyse ERA souhaitée (variable ANA_DIR) 22 22 # Contact pour demander acces aux fichiers sur Jean-Zay : 23 23 # Sophie Bouffiès-Cloché, IPSL : Sophie.Bouffies-Cloche@ipsl.fr … … 34 34 # 35 35 # Guidage en vent(u&v) et/ou temperature, humidite 36 guide_uv= y37 guide_t= n38 guide_q= n36 guide_uv="y" 37 guide_t="n" 38 guide_q="n" 39 39 # 40 40 # Choix des fichiers de guidage ("rea"nalyses) : ERA5, ERAI, OPERA 41 rea= ERA541 rea="ERA5" 42 42 #------------------------------------------------ 43 44 #@JZ ERA5_PATH="/gpfsstore/rech/psl/rpsl376/ergon/ERA5/" 45 #@JZ ERAI_PATH="/gpfsstore/rech/psl/rpsl376/ergon/ERAI/" 46 #@ADS SCRATCH=$SCRATCHDIR 47 48 set -u # raise error if path if unset on machine 49 echo "Paths: $ERA5_PATH $ERAI_PATH $SCRATCH" 50 set +u 43 51 44 52 GRID_DIR=./INIT … … 49 57 #L'utilisateur a maintenant des choix a faire en plus de mth* : type de guidage, et "rea" 50 58 # Alors c'est plus facile d'editer&modifier le script, puis lancer avec ./era2gcm.sh, que de donner tous les params 59 # TODO check w/ Adriana if we can remove those and put them as inline args (above) 51 60 while (($# > 0)) 52 61 do … … 59 68 "-mthini") mth_i=$2 ; shift ; shift ;; 60 69 "-mthend") mth_f=$2 ; shift ; shift ;; 61 *) $0 -h ; exit 70 *) $0 -h ; exit 1 62 71 esac 63 72 done 64 #--Fin du bloc ka examiner --------------------------------------------73 #--Fin du bloc a examiner -------------------------------------------- 65 74 66 75 tmin=1 … … 69 78 GRID_FI=${GRID_DIR}/${resol} 70 79 if [ ! -f "$GRID_FI" ] ; then 71 echo Le fichier $GRID_DIR/$resol est necessaire 72 echo creer le fichier $GRID_FI avec grilles_gcm_netcdf.e 73 exit 80 echo "Le fichier $GRID_DIR/$resol est nécessaire; créer le fichier $GRID_FI avec grilles_gcm_netcdf.e" 81 exit 1 74 82 fi 75 83 mth=$mth_i … … 77 85 78 86 ##################################################################### 79 while (( $mth <= $mth_f )) ; do80 ##################################################################### 81 echo mth $mth82 mois= `echo $mth | cut -c 5-`83 an= `echo $mth | cut -c -4`87 while (( mth <= mth_f )) ; do 88 ##################################################################### 89 echo "mth $mth" 90 mois=$(echo "$mth" | cut -c 5-) 91 an=$(echo "$mth" | cut -c -4) 84 92 ndays=( 31 28 31 30 31 30 31 31 30 31 30 31 ) 85 93 months=( jan feb mar apr may jun jul aug sep oct nov dec ) 86 if [ $(( $an % 4 )) = 0 ] ; then ndays[1]=29 ; fi94 if [ $(( an % 4 )) = 0 ] ; then ndays[1]=29 ; fi 87 95 imois=$(( ${mois#0} - 1 )) 88 96 month=${months[$imois]} 89 97 nday=${ndays[$imois]} 90 tmax=$(( $nday * 4 )) 91 echo PARAMETRES CALENDAIRES $imois $month $nday $tmax 92 93 94 iip1=`ncdump -h $GRID_FI | grep lonu | head -1 | awk ' { print $3 } '` 95 jjm=`ncdump -h $GRID_FI | grep latv | head -1 | awk ' { print $3 } '` 96 (( jjp1 = $jjm + 1 )) 97 (( iim = $iip1 - 1 )) 98 tmax=$(( nday * 4 )) 99 echo "PARAMETRES CALENDAIRES $imois $month $nday $tmax" 100 101 102 iip1=$(ncdump -h "$GRID_FI" | grep lonu | head -1 | awk ' { print $3 } ') 103 jjm=$(ncdump -h "$GRID_FI" | grep latv | head -1 | awk ' { print $3 } ') 104 (( jjp1 = jjm + 1 )) 98 105 # \rm t2.nc ua.nc va.nc sst.nc u.nc v.nc T.nc ts.nc 99 106 … … 108 115 # Lien avec les fichiers netcdf contenant les d0 ECMWF 109 116 ##################################################################### 110 echo -------- liens de telechargement a actualiser ----117 echo "-------- liens de telechargement a actualiser ----" 111 118 if [ "$rea" = "ERA5" ] ; then 112 if [ $an -ge 2022] ; then113 ANA_DIR= '/gpfsstore/rech/psl/rpsl376/ergon/ERA5/NETCDF/GLOBAL_025/hourly'119 if [[ $an -ge 2022 ]] ; then 120 ANA_DIR="$ERA5_PATH/NETCDF/GLOBAL_025/hourly" 114 121 suf="ap1e5.GLOBAL_025" 115 122 else 116 ANA_DIR= '/gpfsstore/rech/psl/rpsl376/ergon/ERA5/NETCDF/GLOBAL_025/4xdaily'123 ANA_DIR="$ERA5_PATH/NETCDF/GLOBAL_025/4xdaily" 117 124 suf="aphe5.GLOBAL_025" 118 125 fi 119 126 elif [ "$rea" = "ERAI" ] ; then 120 #ANA_DIR='http://prodn.idris.fr/thredds/dodsC/ipsl_private/rpsl376/ERAI/NETCDF/GLOBAL_1125/4xdaily' 121 ANA_DIR='/gpfsstore/rech/psl/rpsl376/ergon/ERAI/NETCDF/GLOBAL_1125/4xdaily' 122 #/gpfsstore/rech/psl/rpsl376/ergon/ERAI/NETCDF/GLOBAL_075/4xdaily/AN_PL/2006/u.200601.aphei.GLOBAL_075.nc 127 ANA_DIR="$ERAI_PATH/NETCDF/GLOBAL_1125/4xdaily" 123 128 suf="aphei.GLOBAL_1125" 124 else #OPERA125 #ANA_DIR='http://prodn.idris.fr/thredds/dodsC/ipsl_private/rpsl376/OPERA/NETCDF/4xdaily'126 ANA_DIR='/gpfsstore/rech/psl/rpsl376/ergon/OPERA/NETCDF/4xdaily'127 suf="aph.GLOBAL_1125"128 129 fi 129 130 … … 200 201 if [ "$guide_uv" = "y" ] ; then 201 202 202 cat <<eod>| tmp_uv.jnl 203 204 cat << eod >| tmp_uv.jnl 203 205 ! NB : Augmenter la memoire (plus de 512) peut faire planter 204 206 set memory/size=512 -
BOL/LMDZ_Setup_amaury/lmdz_env.sh
r4991 r4993 70 70 adast) 71 71 module purge 72 # module load PrgEnv-gnu 73 # module load cray-hdf5-parallel 74 # module load netcdf-hdf5parallel/gnu/10.3 72 module load PrgEnv-gnu 73 module load gcc/13.2.0 # required, see https://dci.dci-gitlab.cines.fr/webextranet/user_support/index.html#prgenv-and-compilers 74 75 function cdo { # cdo is available as a spack cmd which requires a specific, incompatible env 76 unset cdo 77 module purge 78 module load GCC-CPU-3.1.0 79 /opt/software/gaia-external/CPU/cdo-2.4.0/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spa/cdo-2.4.0-gcc-12.1-b3qr/bin/cdo "$@" 80 set_env 81 } 82 83 function ferret { 84 unset ferret 85 module purge 86 module load GCC-CPU-3.1.0 87 module load ferret 88 ferret "$@" 89 set_env 90 } 75 91 76 92 account=$(/usr/sbin/my_project.py -l 2>&1 | head -1 | cut -d " " -f 3- | cut -c 5-) … … 80 96 LMDZD="$root_dir/LMDZD" 81 97 LMDZ_INIT="$root_dir/LMDZ_Init" 82 NB_MPI_MAX= 20# TODO 2000 in JZ83 NB_OMP_MAX= 2# TODO 20 in JZ84 RUNCMD="srun --label --account=$account - n"85 SUBMITCMD="sbatch -- account=$account"98 NB_MPI_MAX=1 # TODO 2000 in JZ 99 NB_OMP_MAX=1 # TODO 20 in JZ 100 RUNCMD="srun --label --account=$account --constraint=GENOA -n" 101 SUBMITCMD="sbatch --constraint=GENOA --account=$account" 86 102 ;; 87 103 *) echo "WARNING: RUNNING THIS SCRIPT ON A LOCAL COMPUTER IS DISCOURAGED (lackluster cpus and memory)" -
BOL/LMDZ_Setup_amaury/setup.sh
r4991 r4993 26 26 # in order to re-run the initialisation job, which downloads the aerosol files and interpolates them) 27 27 aerosols="clim" 28 aerosols="n" # TODO TEMP29 28 30 29 # SURFACE/VEGETATION SCHEME 31 # - "none" (bucket scheme) / "CMIP6" or "orch2.0" (orchidee version used in CMIP exercise) / "orch2.2" (orchidee version used in IPSLCM7 configuration) / number (orchidee version number - only rev 7983 on branch _2_2, and 7994 on trunk, are available)32 # TODO check w/ Adriana why only 7983 & 7994, see if still relevant - is it a compilation issue ? Or an INIT issue ?30 # - "none" (bucket scheme) / "CMIP6" (orchidee version used in CMIP exercise) / "7983" (orch2.2) / "7994" (trunk) 31 # If you need other orch versions, and also require XIOS, you'll need to create the appropriate files in DEF/XMLfilesOR... 33 32 veget="CMIP6" 34 # veget="6592" # TODO correct bug in install_lmdz where we don't know which fcm arg to fwd if we only give the rev... see w/ Laurent (choice in ols install_lmdz: only support >2.0)35 33 36 34 # New snow scheme INLANDSIS! "y" / "n" … … 198 196 exit 1 199 197 fi 198 199 if [[ $rad = "ecrad" && $phylmd != "lmd" ]]; then 200 echo "<rad=ecrad> is only supported for <phy=phylmd> here" # (Amaury) I added this check because we fetch ecrad data from libf/phylmd/ecrad/data only. 201 fi 200 202 } 201 203 … … 219 221 cp "$local/install_lmdz.sh" . 220 222 chmod +x install_lmdz.sh 221 echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH" >> install_lmdz_options.$$.sh 223 local make_j=8 224 echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j" >> install_lmdz_options.$$.sh 222 225 chmod +x install_lmdz_options.$$.sh 223 226 echo "Running install_lmdz_options.$$.sh" 224 227 set -o pipefail 225 gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 228 # TODO (wip) Run install_lmdz using $RUNCMD to 1) speed up 2) avoid issues related to being on the "right" platform for compilation 229 # gcm=$MODEL/$($RUNCMD $make_j bash install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 230 gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 226 231 set +o pipefail 227 232 mv install_lmdz.sh install_lmdz.$$.sh … … 305 310 #--------------------------------------------------------------------- 306 311 sed -i'' -e 's/iflag_rrtm=.*.$/iflag_rrtm='"$iflag_rrtm"'/' -e 's/NSW=.*.$/NSW='"$NSW"'/' DEF/physiq.def 307 sed -i '' -e 's:directory_name.*$:directory_name="'"$local"'/ecrad_data",:'DEF/namelist_ecrad312 sed -i"" -e "s:directory_name.*$:directory_name=\"$MODEL/libf/phylmd/ecrad/ecrad_data\",:" DEF/namelist_ecrad 308 313 309 314 if [[ $phylmd = "lmdiso" ]]; then iflag_ice_thermo=0; else iflag_ice_thermo=1; fi … … 519 524 done 520 525 cd - > /dev/null 521 522 if [[ $rad = "ecrad" && ! -d ecrad_data ]]; then523 cd "$local"; wget https://lmdz.lmd.jussieu.fr/pub/3DInputData/ecrad/ecrad_data.tar; tar xvf ecrad_data.tar; cd - > /dev/null524 fi525 526 } 526 527 … … 695 696 function message_post_submit { 696 697 if [[ $ok_guide = "y" && $init = 1 ]]; then 698 enable_platform era2gcm_tuto.sh 697 699 echo "Once initialisation is finished, you have to create nudging files" 698 echo "Edit era2gcm .sh and set the desired parameters in section <User choices>"699 echo "Make sure you have acces to the chosen ERA files, and the required modules are loaded, then run : ./era2gcm .sh"700 echo "Edit era2gcm_tuto.sh and set the desired parameters in section <User choices>" 701 echo "Make sure you have acces to the chosen ERA files, and the required modules are loaded, then run : ./era2gcm_tuto.sh" 700 702 if [[ $aerosols = "spla" ]]; then 701 703 echo "Your aerosol choice is <spla>, so you need ERA 10m-winds interpolated on LMDZ grid. Use script era2gcm_uv10m.sh" … … 703 705 else 704 706 echo "Si tout se passe bien, vous avez initialisé et lancé automatiquement la simulation." 705 echo "Le job qui a été lancé se trouve sur $SIMRUNTOPDIR/ $MAINDIR/tmp_$SIM"707 echo "Le job qui a été lancé se trouve sur $SIMRUNTOPDIR/tmp_$SIM" 706 708 fi 707 709 } … … 724 726 run_sim_or_init 725 727 message_post_submit 726 727 exit 1728 729 730 # COMPILATION OPTIONS depending on the user choices and LMDZ revision number $mysvn731 #-------------------------------------------------------732 733 if [[ $rad = "ecrad" && $aerosols != "n" && $mysvn -lt 4489 ]] ; then echo "Les aerosols tropospheriques ne sont pas pris en charge par ecrad avant LMDZ rev 4489, ici rev est $mysvn"; exit 1; fi734 735 # EXIT after (install and) compilation if we are on jean-zay-pp instead of jean-zay !736 hostname=`hostname`737 if [ ${hostname:0:11} = "jean-zay-pp" ]; then738 echo "You are on jean-zay-pp, here you only can install and compile the model, not run it"739 echo "If you want to run a simulation, log in to jean-zay and launch main.sh again, without install"740 echo `date`741 exit742 fi743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 ###############################################################################762 # At the end, print on screen the compilation command, and also in a "compile.sh" script763 764 echo "To recompile the model :"765 echo "run the compile${sufiso}.sh script created in the present folder: ./compile${sufiso}.sh gcm "
Note: See TracChangeset
for help on using the changeset viewer.