tMakefile - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
 (HTM) git clone git://src.adamsgaard.dk/pism
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       tMakefile (2738B)
       ---
            1 # Run "make all" to update lists of diagnostics and configuration parameters.
            2 
            3 all: update_diagnostics update_parameters installation/code/install_libraries.sh
            4 
            5 INTERMEDIATE=diag.json diag-2.json dummy.nc pism_config.nc surface_input.nc
            6 
            7 .INTERMEDIATE: ${INTERMEDIATE}
            8 
            9 dummy.nc:
           10         # use a thermal bedrock layer model and run for 1 year to complete the
           11         # bootstrapping
           12         pisms -y 1 -Mbz 5 -Lbz 1000 -Mz 5 -Mx 5 -My 5 -o $@ -verbose 1
           13 
           14         # rename climatic_mass_balance: we need precipitation for an atmosphere model
           15         ncrename -v climatic_mass_balance,precipitation -O $@ $@
           16 
           17         # create dummy firn and snow depth fields
           18         ncap2 -s "firn_depth=thk" -O $@ $@
           19         ncatted -a standard_name,firn_depth,d,, -O $@ $@
           20         ncap2 -s "snow_depth=firn_depth" -O $@ $@
           21         # create a dummy (zero) basal water thickness field
           22         ncap2 -s "bwat=firn_depth" -O $@ $@
           23 
           24 # - enthalpy-based energy balance
           25 # - point-wise isostasy bed deformation model
           26 # - PDD surface mass balance model
           27 # - cosine yearly cycle for air temperature (SeaRISE Greenland)
           28 # - SSA+SIA hybrid stress balance
           29 # - routing hydrology
           30 # - all supported calving models
           31 # - constant frontal melt model
           32 diag-2.json: dummy.nc
           33         pismr -i $^ \
           34               -bootstrap \
           35               -energy enthalpy \
           36               -bed_def iso \
           37               -surface pdd \
           38               -atmosphere searise_greenland \
           39               -stress_balance ssa+sia \
           40               -yield_stress mohr_coulomb \
           41               -topg_to_phi 10,30,-50,0 \
           42               -hydrology routing \
           43               -calving eigen_calving,thickness_calving,vonmises_calving \
           44               -frontal_melt constant \
           45               -verbose 1 -o_size none \
           46               -list_diagnostics_json > $@
           47 
           48 # dummy surface input rate to use with the steady hydrology model
           49 surface_input.nc: dummy.nc
           50         ncap2 -v -O -s "water_input_rate=precipitation" $^ $@
           51         ncwa -O -a time $@ $@
           52 
           53 # - steady state hydrology
           54 # - Lingle-Clark bed deformation model
           55 diag.json: dummy.nc surface_input.nc
           56         pismr -i dummy.nc \
           57               -bootstrap \
           58               -bed_def lc \
           59               -hydrology steady \
           60               -hydrology.surface_input.file surface_input.nc \
           61               -hydrology.add_water_input_to_till_storage false \
           62               -verbose 1 -o_size none \
           63               -list_diagnostics_json > $@
           64 
           65 # entries from diag-2.json will override ones in diag.json (in other words, the order
           66 # matters here)
           67 update_diagnostics: diag.json diag-2.json
           68         python ./list_diagnostics.py $^ > manual/diagnostics/diagnostics-list.txt
           69 
           70 pism_config.nc: ../../src/pism_config.cdl
           71         ncgen -o $@ $^
           72 
           73 update_parameters: pism_config.nc
           74         python ./list_parameters.py $^ > manual/parameters/parameter-list.txt
           75 
           76 installation/code/install_libraries.sh: installation/debian-packages.csv Makefile
           77         /bin/echo -n "sudo apt-get install -y " > $@
           78         cut -f1 -d, $< | sed "s/\`//g" | xargs >> $@
           79 
           80 clean:
           81         @rm -f ${INTERMEDIATE}