# WATER_BUDGET # Script to check water conservation in the IPSL coupled model ## SVN information ``` $Author: omamce $ $Date: 2022-12-08 10:24:05 +0100 (Thu, 08 Dec 2022) $ $Revision: 6277 $ $Id: ATM_waterbudget.py 6277 2022-12-08 09:24:05Z omamce $ $HeadURL: svn+ssh://omamce@forge.ipsl.jussieu.fr/ipsl/forge/projets/igcmg/svn/TOOLS/WATER_BUDGET/ATM_waterbudget.py $ ``` ## Example of a simple input file With the simple input file, the scripts will uses the information to constructs the needed file names, according to the libIGCM DRS. On Irene, Jean-Zay and Spip, you need to specifiy the group and user to locate the files. It will extract the restarts from the tar files, and rebuild NEMO restarts. ```config OCE_waterbudget.py [Config] ContinueOnError = True SortIco = False [Experiment] libIGCM = True JobName = TEST-CM72-SIMPLE-ROUTING.13 TagName = IPSLCM7 SpaceName = DEVT ExperimentName = piControl User = p86caub Group = gencmip6 Freq = MO YearBegin = 1850 YearEnd = 1859 PackFrequency = 10 ATM = ICO40 Routing = SIMPLE ORCA = eORCA1.4.2 NEMO = 4.2 Coupled = True ATM_HIS = ico SRF_HIS = ${ATM_HIS} RUN_HIS = ${ATM_HIS} ``` ## Example of full input file All the file names computed by the scripts will be writen back in additional sections. You can add a `[libIGCM]` section to override part or all computed libIGCM directories by pre-determined directory names. You can add a `[Files]` section to override part or all computed file names by pre-determined file names You can add a `[Physics]` section to override some or all default parameters. ``` [Config] ContinueOnError = True SortIco = False [Experiment] JobName = CM71v420-LR-pd-02-out-ico-reg ConfigCard = /ccc/cont003/home/gencmip6/p86caub/IPSLCM7_TUNING_MODIF_ORCHIDEE/config/IPSLCM7/${JobName}/config.card libIGCM = True User = p86caub Group = gencmip6 Freq = MO YearBegin = 1870 YearEnd = 1870 ATM = ICO40 Routing = SIMPLE ORCA = eORCA1.4.2 NEMO = 4.2 Coupled = True ATM_HIS = latlon SRF_HIS = ${ATM_HIS} RUN_HIS = ${ATM_HIS} DateBegin = 18700101 DateEnd = 18701231 [Files] FileOut = ATM_waterbudget_CM71v420-LR-pd-02-out-ico-reg_1870_1870_LATLON.out TmpDir = /ccc/scratch/cont003/gencmip6/p86mart RunDir = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231 dir_ATM_his = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/ATM/Output/MO dir_SRF_his = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/SRF/Output/MO Period = 18700101_18701231_1M DateBegin = 18701231 FileCommon = CM71v420-LR-pd-02-out-ico-reg_18700101_18701231_1M Title = CM71v420-LR-pd-02-out-ico-reg : MO : 18700101 - 18701231 file_ATM_his = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/ATM/Output/MO/CM71v420-LR-pd-02-out-ico-reg_18700101_18701231_1M_histmth.nc file_SRF_his = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/SRF/Output/MO/CM71v420-LR-pd-02-out-ico-reg_18700101_18701231_1M_sechiba_history.nc file_RUN_his = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/SRF/Output/MO/CM71v420-LR-pd-02-out-ico-reg_18700101_18701231_1M_sechiba_history.nc TarRestartPeriod_beg = 18690101_18691231 TarRestartPeriod_end = 18700101_18701231 tar_restart_beg = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/RESTART/CM71v420-LR-pd-02-out-ico-reg_18690101_18691231_restart.tar tar_restart_end = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/RESTART/CM71v420-LR-pd-02-out-ico-reg_18700101_18701231_restart.tar file_ATM_beg = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/ATM_CM71v420-LR-pd-02-out-ico-reg_18691231_restartphy.nc file_ATM_end = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/ATM_CM71v420-LR-pd-02-out-ico-reg_18701231_restartphy.nc file_DYN_beg = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/ICO_CM71v420-LR-pd-02-out-ico-reg_18691231_restart.nc file_DYN_end = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/ICO_CM71v420-LR-pd-02-out-ico-reg_18701231_restart.nc file_SRF_beg = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/SRF_CM71v420-LR-pd-02-out-ico-reg_18691231_sechiba_rest.nc file_SRF_end = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/SRF_CM71v420-LR-pd-02-out-ico-reg_18701231_sechiba_rest.nc file_DYN_aire = /ccc/work/cont003/igcmg/igcmg/IGCM/ATM/GRID/ICO40_grid.nc file_RUN_beg = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/SRF_CM71v420-LR-pd-02-out-ico-reg_18691231_routing_restart.nc file_RUN_end = /ccc/scratch/cont003/gencmip6/p86mart/WATER_CM71v420-LR-pd-02-out-ico-reg_18700101_18701231/SRF_CM71v420-LR-pd-02-out-ico-reg_18701231_routing_restart.nc file_ATM_aire = /ccc/work/cont003/igcmg/igcmg/IGCM/ATM/GRID/aire_ICO40_to_144x143.nc [Physics] Ra = 6366197.7236758135 Grav = 9.81 ICE_rho_ice = 917.0 CE_rho_sno = 330.0 OCE_rho_liq = 1026.0 ATM_rho = 1000.0 SRF_rho = 1000.0 RUN_rho = 1000.0 [libIGCM] ARCHIVE = /ccc/store/cont003/gencmip6/p86caub STORAGE = /ccc/work/cont003/gencmip6/p86caub TmpDir = /ccc/scratch/cont003/gencmip6/p86mart R_IN = /ccc/work/cont003/igcmg/igcmg/IGCM rebuild = /ccc/cont003/home/igcmg/igcmg/Tools/x86_64/rebuild_nemo/bin/rebuild_nemo R_OUT = /ccc/store/cont003/gencmip6/p86caub/IGCM_OUT R_BUF = /ccc/scratch/cont003/gencmip6/p86caub/IGCM_OUT L_EXP = IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg R_BUFR = /ccc/scratch/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg POST_DIR = /ccc/scratch/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/Out REBUILD_DIR = /ccc/scratch/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/REBUILD R_BUF_KSH = /ccc/scratch/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg/Out R_FIGR = /ccc/work/cont003/gencmip6/p86caub/IGCM_OUT/IPSLCM7/DEVT/pdControl/CM71v420-LR-pd-02-out-ico-reg ``` ## State of the art, SVN version 6508 Version qui marche pour : - Grille LMDZ et routage SECHIBA - Grille ICO avec sorties natives et routage SIMPLE : routage pas très précis. Ne marche pas pour : - Grille LMDZ et routage SIMPLE : pb sur runoff - Grille ICO avec sorties interpolées : - OK pour LMD - A finaliser pour SECHIBA