source: issm/oecreview/Archive/25834-26739/ISSM-25924-25925.diff@ 27230

Last change on this file since 27230 was 26740, checked in by Mathieu Morlighem, 3 years ago

CHG: added 25834-26739

File size: 2.2 KB
  • ../trunk-jpl/jenkins/examples_tests.sh

     
    3939
    4040for dir in ./* ; do
    4141        if [ -d "${dir}" ]; then
    42                 # Temporary short circuit to check single example
    43                 if [ "${dir}" != "./UncertaintyQuantification" ]; then
    44                         continue
    45                 fi
     42                # Some of the examples are incomplete (on purpose). As such, we will
     43                # have to populate the missing steps in order to make sure that
     44                # everything is working.
    4645
    47                 # Some of the examples are incomplete (on purpose). As such, we
    48                 # will have to populate the missing steps in order to make sure
    49                 # that everything is working.
    50 
    5146                cd ${dir}
    5247
    5348                if [ "${dir}" == "./AMR" ]; then
     
    571566                        perl -0755 -p -i -e "s|if any\(steps==9\).*% step 9 end|${STEP_NINE}|s" $RUNME_FILE
    572567                        RUN_EXAMPLE=1
    573568                elif [ "${dir}" == "./PigSensitivity" ]; then
    574                         # TODO: Implement step 4
    575 
    576569                        # STEP_FOUR # {{{
    577                         STEP_FOUR="\n disp('Needs work!')"
     570                        STEP_FOUR="\
     571                                if any(steps==4)\n\
     572                                        %Load model\n\
     573                                        md = loadmodel('./Models/PIG_Transient');\n\
     574                                        \n\
     575                                        %Change external forcing basal melting rate and surface mass balance)\n\
     576                                        md.basalforcings.groundedice_melting_rate=zeros(md.mesh.numberofvertices,1);\n\
     577                                        md.basalforcings.floatingice_melting_rate=25*ones(md.mesh.numberofvertices,1);\n\
     578                                        md.smb.mass_balance=2*md.smb.mass_balance;\n\
     579                                        \n\
     580                                        %Define time steps and time span of the simulation\n\
     581                                        md.timestepping.time_step=0.1;\n\
     582                                        md.timestepping.final_time=10;\n\
     583                                        \n\
     584                                        %Request additional outputs\n\
     585                                        md.transient.requested_outputs={'default','IceVolume','IceVolumeAboveFloatation'};\n\
     586                                        \n\
     587                                        %Solve\n\
     588                                        md=solve(md,'Transient');\n\
     589                                        \n\
     590                                        %Save model\n\
     591                                        save ./Models/PIG_SMB md;\n\
     592                                end\n\
     593                        "
    578594                        #}}}
    579595                        sed -i '.bak' 's|steps=\[1\];|steps=\[1:4\];\n\ntry\n|' $RUNME_FILE
    580596                        sed -i '' "s|if any(steps==4)|&${STEP_FOUR}|" $RUNME_FILE
    581                         RUN_EXAMPLE=0
     597                        RUN_EXAMPLE=1
    582598                elif [ "${dir}" == "./shakti" ]; then
    583599                        sed -i '.bak' 's|steps=\[1:3\];|steps=\[1:3\];\n\ntry\n|' $RUNME_FILE
    584600                        RUN_EXAMPLE=1
Note: See TracBrowser for help on using the repository browser.