| 532 | ---- |
| 533 | # Prepare ensembles with ins_job -e # |
| 534 | |
| 535 | {{{ |
| 536 | #!html |
| 537 | <span style="border: solid 1px #000000; padding: 5px; font-weight: bold;"><span style="color: #ff0000">Remark !</span> What follows applies to IPSLCM5_v5. </span> |
| 538 | }}} |
| 539 | |
| 540 | When IPSLCM5_v5 is downloaded with ./model IPSLCM5_v5 it will offer the possibility to launch experiments of the decadal type. |
| 541 | To prepare an ensemble of simulations copy the config.card and ensemble.card files from the directory: |
| 542 | {{{ |
| 543 | modipsl/config/IPSLCM5_v5/EXPERIMENTS/IPSLCM5/decadal/ |
| 544 | }}} |
| 545 | into the directory: |
| 546 | {{{ |
| 547 | modipsl/config/IPSLCM5_v5 |
| 548 | }}} |
| 549 | |
| 550 | Several types of ensemble simulations can be prepared by filling config.card and more importantly ensemble.card. |
| 551 | |
| 552 | == Config.card == |
| 553 | |
| 554 | The file config.card is filled as a regular config.card (ins_job without the -e option). |
| 555 | |
| 556 | The important lines for the ensemble set up are in the [!UserChoices] section. Make sure that !JobName and !ExperimentName are filled with proper values.[[BR]] |
| 557 | The variable !CalendarType should be consistent with the simulations from which you are initialising or else the restart file with the proper date may not exist.[[BR]] |
| 558 | The variables !DateBegin and !DateEnd will be overriden by variables present in ensemble.card. |
| 559 | {{{ |
| 560 | #D-- UserChoices - |
| 561 | [UserChoices] |
| 562 | #============================ |
| 563 | JobName=v3h4testB |
| 564 | #----- Short Name of Experiment |
| 565 | ExperimentName=v3h4testB |
| 566 | #----- DEVT TEST PROD |
| 567 | SpaceName=DEVT |
| 568 | LongName="IPSLCM5A CMIP5 DEVT phase decadal example with limited outputs." |
| 569 | TagName=IPSLCM5A |
| 570 | #D- Choice of experiment in EXPERIEMENTS directory |
| 571 | ExpType=IPSLCM5/decadal |
| 572 | #============================ |
| 573 | #-- leap, noleap, 360d |
| 574 | CalendarType=noleap |
| 575 | #-- Experiment dates : Beginning and ending |
| 576 | #-- "YYYY-MM-DD" |
| 577 | DateBegin=2013-01-01 |
| 578 | DateEnd=2022-12-31 |
| 579 | #============================ |
| 580 | #-- 1Y, 1M, 5D, 1D Period Length of one trunk of simulation |
| 581 | PeriodLength=1M |
| 582 | #============================ |
| 583 | #-- Total Number of Processors (minimum is 2 for a coupled configuration) |
| 584 | #JobNumProcTot=4 |
| 585 | JobNumProcTot=32 |
| 586 | }}} |
| 587 | |
| 588 | A section [Ensemble] should also be present. It contains the information that we want to prepare an ensemble simulation with variable !EnsembleRun set to y and three unset fields to be filled in the config.card of each member after ins_job -e has run. |
| 589 | {{{ |
| 590 | [Ensemble] |
| 591 | #D- Ensemble run ? 'y' or 'n' |
| 592 | #D- If 'y', fill in ensemble.card !! |
| 593 | EnsembleRun=y |
| 594 | EnsembleName= |
| 595 | EnsembleDate= |
| 596 | EnsembleType= |
| 597 | }}} |
| 598 | |
| 599 | == Ensemble.card == |
| 600 | |
| 601 | There are several sections in ensemble.card: |
| 602 | [Ens_PARAMETRIC], [Ens_DATE] and [Ens_PERTURB]. |
| 603 | |
| 604 | The choice of ensemble types is done by setting the variable active to y or n. |
| 605 | {{{ |
| 606 | [Ens_PERTURB] |
| 607 | # active=y to use this ensemble type |
| 608 | active=y |
| 609 | }}} |
| 610 | |
| 611 | We cover here the third section which allows to generate members from an initial condition which is perturbed by different means.[[BR]] |
| 612 | |
| 613 | There are two ways to perturb the initial condition: |
| 614 | * apply some random white noise of defined amplitude to the temperature field of the coupler component (CPL) restart file |
| 615 | * apply some previously generated 3D temperature perturbation map to the temperature field of the ocean component (OCE) restart file |
| 616 | |
| 617 | Each method apply only to the relevant type of ensemble generation available inside [Ens_PERTURB] as will be explained later. |
| 618 | |
| 619 | Before detailing the different functionalities available in [Ens_PERTURB] let us discuss the NAME variable.[[BR]] |
| 620 | This variable should be set identical to the !JobName variable, otherwise the script will fail to generate the proper files. |
| 621 | {{{ |
| 622 | # ensemble name (must be equal to JobName in config.card) |
| 623 | NAME=v3h4testB |
| 624 | }}} |
| 625 | |
| 626 | === Periodic start dates === |
| 627 | |
| 628 | For this type of perturbed ensembles the following variables are left empty: |
| 629 | {{{ |
| 630 | # member list (apply list of pattern to initial state) |
| 631 | MEMBER_LIST=() |
| 632 | |
| 633 | # member list of names corresponding to each member |
| 634 | MEMBER_NAMESLIST=() |
| 635 | |
| 636 | # member pattern global name |
| 637 | MEMBER_INITFROM= |
| 638 | |
| 639 | # member pattern global directory for name |
| 640 | MEMBER_INITPATH= |
| 641 | ... |
| 642 | # start dates list |
| 643 | NONPERIODIC=() |
| 644 | # length list for non periodic simulation (NOTE: use length above if not fill) |
| 645 | LENGTH_NONPERIODIC=() |
| 646 | ... |
| 647 | # Path of Mask file |
| 648 | MASKPATH= |
| 649 | }}} |
| 650 | |
| 651 | In ensemble.card, it is possible to specify a periodic list of start dates.[[BR]] |
| 652 | Restart files will be generated for each member at each date starting from BEGIN_INIT to END_INIT with a periodicity of PERIODICITY.[[BR]] |
| 653 | The variable MEMBER sets the number of members for each start date. |
| 654 | |
| 655 | The following part of ensemble.card sets 10 members from 19900101 to 20000101 every 2 years each lasting 10 years: |
| 656 | {{{ |
| 657 | # member nb (i.e nb of perturb initial restart for each date) |
| 658 | MEMBER=10 |
| 659 | ... |
| 660 | # periodic and member list simulations length |
| 661 | LENGTH=10Y |
| 662 | # start date of the first ensemble |
| 663 | BEGIN_INIT=19900101 |
| 664 | # start date of the last ensemble |
| 665 | END_INIT=20000101 |
| 666 | # timestep between each periodic simulation |
| 667 | PERIODICITY=2Y |
| 668 | }}} |
| 669 | |
| 670 | This will produce 10 members starting at the dates : 19900101, 19920101, 19940101, 19960101, 19980101, 20000101. (PERIODICITY can be given in months for shorter periods) |
| 671 | |
| 672 | Each time the restart file to be perturbed in order to produce each member is taken from the previous day of the start date : 19893112, 19913112, etc... |
| 673 | |
| 674 | The directory in which the start date is retrieved is given by INITPATH and INITFROM.[[BR]] |
| 675 | To restart from experiment v3h4BTxx in directory /ccc/store/cont003/gen2211/nguyens/IGCM_OUT/IPSLCM5A/PROD/historical fill: |
| 676 | {{{ |
| 677 | # Restart name |
| 678 | INITFROM=v3h4BTxx |
| 679 | # Restart directory |
| 680 | INITPATH=/ccc/store/cont003/gen2211/nguyens/IGCM_OUT/IPSLCM5A/PROD/historical |
| 681 | }}} |
| 682 | |
| 683 | The way the perturbed member is generated depends on PERTURB_BIN array. |
| 684 | The first two elements are the most important. The first one is the executable to be used to produce the members, the second one is the component from which the restart is perturbed. |
| 685 | |
| 686 | In the Periodic Case it is only possible to build the members by applying a randomly generated temperature pattern on the restart file of the coupler. |
| 687 | PERTURB_BIN should look like this: |
| 688 | {{{ |
| 689 | PERTURB_BIN=(AddNoise, CPL, sstoc, O_SSTSST, 0.1) |
| 690 | }}} |
| 691 | The list is interpretted as follows: |
| 692 | * the used executable is ''!AddNoise'', |
| 693 | * the component is the coupler (''CPL''), |
| 694 | * the restart file to perturb contains ''sstoc'' in its name, |
| 695 | * the variable to perturb in the restart file is ''O_SSTSST'', |
| 696 | * the randomly generated pertubation is in [-.05;+0.05] degrees |
| 697 | |
| 698 | For each member (in our example we have ten) a new restart file for the coupler will be generated using the executable addnoise to add some randomly generated temperature perturbation.[[BR]] |
| 699 | For the year 1990, the corresponding restart file of member 1 will be stored in |
| 700 | {{{ |
| 701 | $WORKDIR/IGCM_IN/v3h4testB190/v3h4testB190A/CPL/Restart/ |
| 702 | }}} |
| 703 | |
| 704 | === Non-Periodic start dates === |
| 705 | |
| 706 | For this type of perturbed ensembles the following variables are left empty: |
| 707 | {{{ |
| 708 | # member list (apply list of pattern to initial state) |
| 709 | MEMBER_LIST=() |
| 710 | |
| 711 | # member list of names corresponding to each member |
| 712 | MEMBER_NAMESLIST=() |
| 713 | |
| 714 | # member pattern global name |
| 715 | MEMBER_INITFROM= |
| 716 | |
| 717 | # member pattern global directory for name |
| 718 | MEMBER_INITPATH= |
| 719 | ... |
| 720 | # start dates list |
| 721 | NONPERIODIC=() |
| 722 | # length list for non periodic simulation (NOTE: use length above if not fill) |
| 723 | LENGTH_NONPERIODIC=() |
| 724 | ... |
| 725 | # start date of the first ensemble |
| 726 | BEGIN_INIT= |
| 727 | # start date of the last ensemble |
| 728 | END_INIT= |
| 729 | ... |
| 730 | # Path of Mask file |
| 731 | MASKPATH= |
| 732 | }}} |
| 733 | |
| 734 | The variable LENGTH must be set to something but is not used, PERIODICITY must be set to NONE: |
| 735 | {{{ |
| 736 | # periodic and member list simulations length |
| 737 | LENGTH=10Y |
| 738 | ... |
| 739 | # timestep between each periodic simulation (NONE for nonperiodic) |
| 740 | PERIODICITY=NONE |
| 741 | }}} |
| 742 | |
| 743 | To set 10 members for the starting dates 1990 and 1992 for a duration of 10 years, set MEMBER, NONPERIODIC and LENGTH_NONPERIODIC as follows: |
| 744 | {{{ |
| 745 | # member nb (i.e nb of perturb initial restart for each date) |
| 746 | MEMBER=10 |
| 747 | ... |
| 748 | # start dates list |
| 749 | NONPERIODIC=(19900101 19920101) |
| 750 | # length list for non periodic simulation (NOTE: use length above if not fill) |
| 751 | LENGTH_NONPERIODIC=(10Y 10Y) |
| 752 | }}} |
| 753 | This results in 20 simulations in total. |
| 754 | |
| 755 | |
| 756 | The restart files to be perturbed to produce each member are sought in directory INITFROM which PATH is INITPATH. |
| 757 | {{{ |
| 758 | # Restart name |
| 759 | INITFROM=v3h4BT00 |
| 760 | # Restart directory |
| 761 | INITPATH=/ccc/store/cont003/gen0826/labetoul/dmf_import/IGCM_OUT/IPSLCM5A/PROD/historical |
| 762 | }}} |
| 763 | This will result in using restarts from experiment ''v3h4BT00'' located in directory ''/ccc/store/cont003/gen0826/labetoul/dmf_import/IGCM_OUT/IPSLCM5A/PROD/historical''. |
| 764 | |
| 765 | The perturbation executable must be ''!AddNoise''. |
| 766 | {{{ |
| 767 | PERTURB_BIN=(AddNoise, CPL, sstoc, O_SSTSST, 0.1) |
| 768 | }}} |
| 769 | |
| 770 | === List of members for a single start date === |
| 771 | |
| 772 | For this type of perturbed ensembles the following variables are left empty: |
| 773 | {{{ |
| 774 | # member nb (i.e nb of perturb initial restart for each date) |
| 775 | MEMBER= |
| 776 | # timestep between each periodic simulation (NONE for nonperiodic) |
| 777 | PERIODICITY=NONE |
| 778 | # start dates list |
| 779 | NONPERIODIC=() |
| 780 | # length list for non periodic simulation (NOTE: use length above if not fill) |
| 781 | LENGTH_NONPERIODIC=() |
| 782 | }}} |
| 783 | It is important to leave PERIODICTY set to NONE and LENGTH_NONPERIODIC as an empty list: the list of member method only works for a single start date and neither with periodic start dates nor with non periodic start dates. |
| 784 | |
| 785 | The variables BEGIN_INIT and END_INIT are set to the same date, only BEGIN_INIT will be used to provide the start date of the simulation for each member. |
| 786 | {{{ |
| 787 | # start date of the first ensemble |
| 788 | BEGIN_INIT=20560101 |
| 789 | # start date of the last ensemble |
| 790 | END_INIT=20560101 |
| 791 | }}} |
| 792 | |
| 793 | The variable LENGTH is the computation time which is the same for all members. |
| 794 | {{{ |
| 795 | # periodic and member list simulations length |
| 796 | LENGTH=10Y |
| 797 | }}} |
| 798 | |
| 799 | MEMBER_NAMESLIST is the list of names given to each member. It gives the names of the subdirectories from which the Job is submitted for each member as well as the subdirectories in which the results are stored for each member. |
| 800 | |
| 801 | MEMBER_LIST is the list of perturbation maps files names prefix to apply to the restart file. It is implied that the files are named ''prefix.nc''. |
| 802 | |
| 803 | MEMBER_INITFROM is the directory in which the perturbations maps are stored. |
| 804 | |
| 805 | MEMBER_INITPATH is the path to this directory. |
| 806 | |
| 807 | {{{ |
| 808 | # member list (apply list of pattern to initial state) |
| 809 | MEMBER_LIST=(OWN3DT_A, OWN3DT_B, OWN3DT_C, OWN3DT_D) |
| 810 | |
| 811 | # member list of names corresponding to each member |
| 812 | MEMBER_NAMESLIST=(OWN3DTA, OWN3DTB, OWN3DTC, OWN3DTD) |
| 813 | |
| 814 | # member pattern global directory name |
| 815 | MEMBER_INITFROM=OWN3DTpf |
| 816 | |
| 817 | # member pattern global directory for name |
| 818 | MEMBER_INITPATH=/ccc/work/cont003/gen2211/nguyens/PERTU/VECTORS |
| 819 | }}} |
| 820 | |
| 821 | The variables INITFROM and INITPATH are still used to point to the directory where the restart files including the one to be perturbed are available. |
| 822 | |
| 823 | {{{ |
| 824 | # Restart name |
| 825 | INITFROM=piControl2 |
| 826 | |
| 827 | # Restart directory |
| 828 | INITPATH=/ccc/store/cont003/dsm/p86caub/dmf_import/IGCM_OUT/IPSLCM5A/PROD/piControl |
| 829 | }}} |
| 830 | |
| 831 | For the member list perturbation type we use the executable AddPertu3DOCE and set PERTURB_BIN this way: |
| 832 | {{{ |
| 833 | # perturbation type |
| 834 | PERTURB_BIN=(AddPertu3DOCE, OCE, restart, tn, ORCA2_mesh_mask.nc) |
| 835 | }}} |
| 836 | The elements of the list mean: |
| 837 | * the executable to be called to generate the perturbation is ''AddPertu3DOCE'' |
| 838 | * the component is the Ocean (''OCE'') |
| 839 | * the restart file to perturb is ''*restart*.nc'' |
| 840 | * the field to perturb in the restart file is ''tn'' |
| 841 | * the meshmask file to tell if the gridcell is land or sea is ''ORCA2_mesh_mask.nc'' |
| 842 | |
| 843 | The path to the mesh mask file is given in MASKPATH. |
| 844 | {{{ |
| 845 | # Path of Mask file |
| 846 | MASKPATH=/ccc/cont003/home/gen2211/nguyens/addpertu |
| 847 | }}} |
| 848 | |
| 849 | Once config.card and ensemble.card properly filled the directories containing the jobs to launch the simulations are created by issuing the command: |
| 850 | {{{ |
| 851 | ins_job -e |
| 852 | }}} |