Browse Source

Applied IOW specific changes.

Found at https://gitlab.io-warnemuende.de/thomas.neumann/iow-mom.git
using commit:

Autor:			Thomas Neumann <thomas.neumann@io-warnemuende.de>
Datum:			vor 4 Jahren (30.11.2017 11:08:22)
Commit Hash:	ad3c6ed66df8536dd7dccde5e4e8f0800112cd86
Kinder:			9b9b5f45 Commit Index
Elter:			3d09989c

Added missing compile scripts in the "exp" directory

modified:   bin/mkmf.template.ifc
new file:   exp/FMS_compile.csh
new file:   exp/atmos_null_compile.csh
new file:   exp/ice_compile.csh
new file:   exp/land_null_compile.csh
new file:   exp/ocean_compile.csh
new file:   src/postprocessing/mppnccombine/mppnccombine.c.chunking.c
Enthalten in folgenden Branches:
(HEAD detached at ad3c6ed)
iow-mom
In keinem Tag enthalten

Leitet ab von keinem Tag
distribute-radiation-on-surface-types
Sven Karsten 2 years ago
parent
commit
8ddf4e5519
  1. 0
      bin/environs.ifc
  2. 15
      bin/mkmf.template.ifc
  3. 108
      exp/FMS_compile.csh
  4. 845
      exp/MOM_compile.csh
  5. 15
      exp/atmos_null_compile.csh
  6. 16
      exp/ice_compile.csh
  7. 15
      exp/land_null_compile.csh
  8. 15
      exp/ocean_compile.csh
  9. 7
      src/coupler/flux_exchange.F90
  10. 80
      src/ice_sis/ice_bergs.F90
  11. 8
      src/ice_sis/ice_dyn.F90
  12. 5
      src/ice_sis/ice_model.F90
  13. 5
      src/ice_sis/ice_type.F90
  14. 4
      src/mom5/drivers/ocean_solo.F90
  15. 5
      src/mom5/ocean_bgc/ocean_generic_tracer.F90
  16. 13
      src/mom5/ocean_blobs/ocean_blob.F90
  17. 2
      src/mom5/ocean_blobs/ocean_blob_dynamic_bottom.F90
  18. 2
      src/mom5/ocean_blobs/ocean_blob_dynamic_free.F90
  19. 2
      src/mom5/ocean_blobs/ocean_blob_util.F90
  20. 2
      src/mom5/ocean_core/ocean_advection_velocity.F90
  21. 8
      src/mom5/ocean_core/ocean_barotropic.F90
  22. 8
      src/mom5/ocean_core/ocean_bbc.F90
  23. 60
      src/mom5/ocean_core/ocean_density.F90
  24. 30
      src/mom5/ocean_core/ocean_model.F90
  25. 115
      src/mom5/ocean_core/ocean_sbc.F90
  26. 3
      src/mom5/ocean_core/ocean_thickness.F90
  27. 4
      src/mom5/ocean_core/ocean_types.F90
  28. 10
      src/mom5/ocean_core/ocean_velocity.F90
  29. 822
      src/mom5/ocean_diag/ocean_drifters.F90
  30. 2
      src/mom5/ocean_diag/ocean_velocity_diag.F90
  31. 203
      src/mom5/ocean_param/lateral/ocean_lap_tracer.F90
  32. 11
      src/mom5/ocean_param/lateral/ocean_mixdownslope.F90
  33. 9
      src/mom5/ocean_param/sources/ocean_shortwave.F90
  34. 171
      src/mom5/ocean_param/sources/ocean_shortwave_gfdl.F90
  35. 227
      src/mom5/ocean_param/sources/ocean_shortwave_jerlov.F90
  36. 209
      src/mom5/ocean_param/vertical/ocean_vert_kpp_mom4p1.F90
  37. 8
      src/mom5/ocean_param/vertical/ocean_vert_mix.F90
  38. 28
      src/mom5/ocean_tracers/fabm_driver.F90
  39. 9
      src/mom5/ocean_tracers/fabm_driver.h
  40. 8
      src/mom5/ocean_tracers/mom4p1.tex
  41. 2360
      src/mom5/ocean_tracers/ocean_fabm.F90
  42. 4
      src/mom5/ocean_tracers/ocean_tempsalt.F90
  43. 160
      src/mom5/ocean_tracers/ocean_tpm.F90
  44. 8
      src/mom5/ocean_tracers/ocean_tracer.F90
  45. 190
      src/mom5/ocean_wave/ocean_wave.F90
  46. 6
      src/mom5/ocean_wave/ocean_wave_type.F90
  47. 2
      src/ocean_shared/generic_tracers/generic_COBALT.F90
  48. 13693
      src/ocean_shared/generic_tracers/generic_ERGOM.F90
  49. 12
      src/ocean_shared/generic_tracers/generic_tracer.F90
  50. 48
      src/ocean_shared/generic_tracers/generic_tracer_utils.F90
  51. 10
      src/postprocessing/mppnccombine/makefile_icc
  52. 34
      src/postprocessing/mppnccombine/mppnccombine.c
  53. 1484
      src/postprocessing/mppnccombine/mppnccombine.c.chunking.c
  54. 6
      src/preprocessing/generate_grids/make_xgrids/make_xgrids.csh
  55. 19
      src/preprocessing/generate_grids/ocean/ocean_grid_generator.csh
  56. 6
      src/shared/coupler/atmos_ocean_fluxes.F90
  57. 2
      src/shared/diag_manager/diag_data.F90
  58. 194
      src/shared/drifters/cloud_interpolator.F90
  59. 67
      src/shared/drifters/drifters.F90
  60. 477
      src/shared/drifters/drifters_comm.F90
  61. 165
      src/shared/drifters/drifters_compute_k.h
  62. 34
      src/shared/drifters/drifters_core.F90
  63. 24
      src/shared/drifters/drifters_io.F90
  64. 51
      src/shared/drifters/drifters_push.h
  65. 47
      src/shared/drifters/drifters_set_field.h
  66. 9
      src/shared/exchange/xgrid.F90
  67. 48
      src/shared/mpp/include/mpp_io_connect.inc
  68. 9
      src/shared/mpp/include/mpp_io_read.inc
  69. 242
      src/shared/mpp/include/mpp_io_write.inc
  70. 5
      src/shared/mpp/include/mpp_update_nest_domains.h
  71. 8
      src/shared/mpp/include/mpp_util.inc
  72. 9
      src/shared/mpp/mpp.F90
  73. 202
      src/shared/mpp/mpp_io.F90

0
bin/environs.ifc

15
bin/mkmf.template.ifc

@ -1,9 +1,18 @@
# template for the Intel fortran compiler version 8
# typical use with mkmf
# mkmf -t template.ifc -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include
FFLAGS = -stack_temps -safe_cray_ptr -ftz -i_dynamic -assume byterecl -O2 -i4 -r8 -w95
CPPFLAGS = -I/usr/include -I/usr/local/include
# pkg-config --cflags-only-I ompi-fort
CPPFLAGS = -I/usr/include -I${NETCDF_INC} -I/sw/comp/openmpi/OS_13.2/2.0.1/ifort-2017.1.132/include -I/sw/comp/openmpi/OS_13.2/2.0.1/ifort-2017.1.132/lib64
FFLAGS = -O2 -traceback -ip -xHost -align all -IPF-fp-relaxed -assume byterecl -r8
# debug
#FFLAGS = -O1 -traceback -ip -xHost -align all -IPF-fp-relaxed -assume byterecl -r8
# repro
#FFLAGS = -fno-alias -automatic -safe-cray-ptr -ftz -assume byterecl -i4 -r8 -nowarn -O2 -debug minimal -fp-model precise -override-limits
FC = ifort
LD = ifort
LDFLAGS = -L/usr/local/lib -lnetcdf_ifc
CC = icc
# pkg-config --libs-only-L ompi-fort
# pkg-config --libs-only-l ompi-fort
LDFLAGS = -Wl,-rpath,${NETCDF_LIB},-rpath,/sw/data/hdf5/OS_13.2/1.8.18/intel_2017.1.132_threadsafe/lib64,-rpath,/sw/comp/openmpi/OS_13.2/2.0.1/ifort-2017.1.132/lib64,-rpath,/opt/torque/lib64 -L${NETCDF_LIB} -L/sw/data/hdf5/OS_13.2/1.8.18/intel_2017.1.132_threadsafe/lib64 -L/sw/comp/openmpi/OS_13.2/2.0.1/ifort-2017.1.132/lib64 -L/opt/torque/lib64 -lnetcdff -lnetcdf -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
CFLAGS = -D__IFC

108
exp/FMS_compile.csh

@ -0,0 +1,108 @@
# Build the shared FMS component library
# The list of source files that should be compiled for this component.
set pathnames_shared = $code_dir/path_names_shared # path to file containing list of source paths
cat > $pathnames_shared <<EOF_shared
shared/drifters/cloud_interpolator.F90
shared/drifters/drifters.F90
shared/drifters/drifters_comm.F90
shared/drifters/drifters_compute_k.h
shared/drifters/drifters_core.F90
shared/drifters/drifters_input.F90
shared/drifters/drifters_io.F90
shared/drifters/drifters_push.h
shared/drifters/drifters_set_field.h
shared/drifters/fms_switches.h
shared/drifters/quicksort.F90
shared/exchange/stock_constants.F90
shared/exchange/xgrid.F90
shared/fms/fms.F90
shared/fms/fms_io.F90
shared/fms/read_data_2d.inc
shared/fms/read_data_3d.inc
shared/fms/read_data_4d.inc
shared/fms/write_data.inc
shared/mpp/mpp.F90
shared/mpp/mpp_data.F90
shared/mpp/mpp_domains.F90
shared/mpp/mpp_io.F90
shared/mpp/mpp_memutils.F90
shared/mpp/mpp_parameter.F90
shared/mpp/mpp_pset.F90
shared/mpp/mpp_utilities.F90
shared/mpp/nsclock.c
shared/mpp/threadloc.c
shared/mpp/include/mpp_chksum.h
shared/mpp/include/mpp_chksum_int.h
shared/mpp/include/mpp_chksum_scalar.h
shared/mpp/include/mpp_comm.inc
shared/mpp/include/mpp_comm_mpi.inc
shared/mpp/include/mpp_comm_nocomm.inc
shared/mpp/include/mpp_comm_sma.inc
shared/mpp/include/mpp_data_mpi.inc
shared/mpp/include/mpp_data_nocomm.inc
shared/mpp/include/mpp_data_sma.inc
shared/mpp/include/mpp_do_get_boundary.h
shared/mpp/include/mpp_do_global_field.h
shared/mpp/include/mpp_do_redistribute.h
shared/mpp/include/mpp_do_update.h
shared/mpp/include/mpp_do_updateV.h
shared/mpp/include/mpp_do_updateV_ad.h
shared/mpp/include/mpp_do_update_ad.h
shared/mpp/include/mpp_domains_comm.inc
shared/mpp/include/mpp_domains_define.inc
shared/mpp/include/mpp_domains_misc.inc
shared/mpp/include/mpp_domains_reduce.inc
shared/mpp/include/mpp_domains_util.inc
shared/mpp/include/mpp_error_a_a.h
shared/mpp/include/mpp_error_a_s.h
shared/mpp/include/mpp_error_s_a.h
shared/mpp/include/mpp_error_s_s.h
shared/mpp/include/mpp_get_boundary.h
shared/mpp/include/mpp_global_field.h
shared/mpp/include/mpp_global_reduce.h
shared/mpp/include/mpp_global_sum.h
shared/mpp/include/mpp_global_sum_ad.h
shared/mpp/include/mpp_global_sum_tl.h
shared/mpp/include/mpp_io_connect.inc
shared/mpp/include/mpp_io_misc.inc
shared/mpp/include/mpp_io_read.inc
shared/mpp/include/mpp_io_util.inc
shared/mpp/include/mpp_io_write.inc
shared/mpp/include/mpp_read_2Ddecomp.h
shared/mpp/include/mpp_reduce_mpi.h
shared/mpp/include/mpp_reduce_nocomm.h
shared/mpp/include/mpp_reduce_sma.h
shared/mpp/include/mpp_sum.inc
shared/mpp/include/mpp_sum_mpi.h
shared/mpp/include/mpp_sum_nocomm.h
shared/mpp/include/mpp_sum_sma.h
shared/mpp/include/mpp_transmit.inc
shared/mpp/include/mpp_transmit_mpi.h
shared/mpp/include/mpp_transmit_nocomm.h
shared/mpp/include/mpp_transmit_sma.h
shared/mpp/include/mpp_update_domains2D.h
shared/mpp/include/mpp_update_domains2D_ad.h
shared/mpp/include/mpp_util.inc
shared/mpp/include/mpp_util_mpi.inc
shared/mpp/include/mpp_util_nocomm.inc
shared/mpp/include/mpp_util_sma.inc
shared/mpp/include/mpp_write.h
shared/mpp/include/mpp_write_2Ddecomp.h
shared/mpp/include/system_clock.h
EOF_shared
set srcList = ( shared/tridiagonal shared/tracer_manager shared/topography shared/time_manager shared/time_interp shared/station_data shared/sat_vapor_pres shared/random_numbers shared/platform shared/oda_tools shared/diag_manager shared/data_override shared/coupler shared/constants shared/column_diagnostics shared/axis_utils shared/astronomy shared/amip_interp shared/fft shared/field_manager shared/horiz_interp shared/include shared/memutils shared/mosaic)
set lib_name = "lib_FMS"
mkdir -p $executable:h:h/$lib_name
cd $executable:h:h/$lib_name
$mkmf_lib -p $lib_name.a -c "$cppDefs" $srcList $pathnames_shared $lib_include_dirs
make
if( $status ) then
echo "Make failed to create $lib_name.a"
exit 1
endif

845
exp/MOM_compile.csh

@ -1,10 +1,14 @@
#!/bin/csh -f
# Minimal compile script for fully coupled model CM2M experiments
#module unload intel.compiler mpt
#module load intel.compiler/12.0.4
#module load mpt/1.26
set echo
set platform = ncrc2.intel # A unique identifier for your platfo
set platform = ifc # A unique identifier for your platfo
# This corresponds to the mkmf templates in $root/bin dir.
set type = MOM_solo # Type of the experiment
set type = MOM_SIS # Type of the experiment
set help = 0
set argv = (`getopt -u -o h -l type: -l platform: -l help -- $*`)
@ -30,8 +34,9 @@ if ( $help ) then
echo " CM2M : ocean-seaice-land-atmosphere coupled climate model"
echo " ESM2M : ocean-seaice-land-atmosphere coupled climate model with biogeochemistry, EarthSystemModel"
echo " ICCM : ocean-seaice-land-atmosphere coupled model"
echo " EBM : ocean-seaice-land-atmosphere coupled model with energy balance atmosphere"
echo
echo "--platform followed by the platform name that has a corresponfing environ file in the ../bin dir, default is ncrc.intel"
echo "--platform followed by the platform name that has a corresponding environ file in the ../bin dir, default is ncrc.intel"
echo
echo
exit 0
@ -46,7 +51,7 @@ set executable = $root/exec/$platform/$type/fms_$type.x # executable cre
set mppnccombine = $root/bin/mppnccombine.$platform # path to executable mppnccombine
set mkmfTemplate = $root/bin/mkmf.template.$platform # path to template for your platform
set mkmf = $root/bin/mkmf # path to executable mkmf
set cppDefs = ( "-Duse_netCDF -Duse_netCDF3 -Duse_libMPI -DUSE_OCEAN_BGC -DENABLE_ODA -DSPMD -DLAND_BND_TRACERS" )
set cppDefs = ( "-Duse_netCDF -Duse_netCDF4 -Duse_libMPI -DUSE_OCEAN_BGC -DENABLE_ODA -DSPMD -DLAND_BND_TRACERS" )
#On Altrix systems you may include "-Duse_shared_pointers -Duse_SGI_GSM" in cppDefs for perfomance.
#These are included in the GFDL configuration of the model.
@ -56,783 +61,111 @@ if($static) then
set cppDefs = "$cppDefs -DMOM_STATIC_ARRAYS -DNI_=360 -DNJ_=200 -DNK_=50 -DNI_LOCAL_=60 -DNJ_LOCAL_=50"
endif
if ( $type == EBM ) then
set cppDefs = ( "-Duse_netCDF -Duse_netCDF3 -Duse_libMPI -DLAND_BND_TRACERS -DOVERLOAD_C8 -DOVERLOAD_C4 -DOVERLOAD_R4" )
endif
#
# Users must ensure the correct environment file exists for their platform.
#
source $root/bin/environs.$platform # environment variables and loadable modules
# setup directory structure
if ( ! -d $executable:h ) mkdir -p $executable:h
#
# compile mppnccombine.c, needed only if $npes > 1
if ( ! -f $mppnccombine ) then
cc -O -o $mppnccombine -I/usr/local/include -L/usr/local/lib $code_dir/postprocessing/mppnccombine/mppnccombine.c -lnetcdf
endif
# Build the shared FMS component library
# The list of source files that should be compiled for this component.
set pathnames_shared = $code_dir/path_names_shared # path to file containing list of source paths
cat > $pathnames_shared <<EOF_shared
shared/amip_interp/amip_interp.F90
shared/astronomy/astronomy.F90
shared/axis_utils/axis_utils.F90
shared/column_diagnostics/column_diagnostics.F90
shared/constants/constants.F90
shared/coupler/atmos_ocean_fluxes.F90
shared/coupler/coupler_types.F90
shared/coupler/ensemble_manager.F90
shared/data_override/data_override.F90
shared/diag_manager/diag_axis.F90
shared/diag_manager/diag_data.F90
shared/diag_manager/diag_grid.F90
shared/diag_manager/diag_manager.F90
shared/diag_manager/diag_output.F90
shared/diag_manager/diag_util.F90
shared/diag_manager/diag_table.F90
shared/drifters/cloud_interpolator.F90
shared/drifters/drifters.F90
shared/drifters/drifters_comm.F90
shared/drifters/drifters_compute_k.h
shared/drifters/drifters_core.F90
shared/drifters/drifters_input.F90
shared/drifters/drifters_io.F90
shared/drifters/drifters_push.h
shared/drifters/drifters_set_field.h
shared/drifters/fms_switches.h
shared/drifters/quicksort.F90
shared/exchange/stock_constants.F90
shared/exchange/xgrid.F90
shared/fft/fft.F90
shared/fft/fft99.F90
shared/field_manager/field_manager.F90
shared/field_manager/fm_util.F90
shared/field_manager/parse.inc
shared/fms/fms.F90
shared/fms/fms_io.F90
shared/fms/read_data_2d.inc
shared/fms/read_data_3d.inc
shared/fms/read_data_4d.inc
shared/fms/write_data.inc
shared/horiz_interp/horiz_interp.F90
shared/horiz_interp/horiz_interp_bicubic.F90
shared/horiz_interp/horiz_interp_bilinear.F90
shared/horiz_interp/horiz_interp_conserve.F90
shared/horiz_interp/horiz_interp_spherical.F90
shared/horiz_interp/horiz_interp_type.F90
shared/include/fms_platform.h
shared/memutils/memuse.c
shared/memutils/memutils.F90
shared/mosaic/constant.h
shared/mosaic/create_xgrid.c
shared/mosaic/create_xgrid.h
shared/mosaic/gradient.F90
shared/mosaic/gradient_c2l.c
shared/mosaic/gradient_c2l.h
shared/mosaic/grid.F90
shared/mosaic/interp.c
shared/mosaic/interp.h
shared/mosaic/mosaic.F90
shared/mosaic/mosaic_util.c
shared/mosaic/mosaic_util.h
shared/mosaic/read_mosaic.c
shared/mosaic/read_mosaic.h
shared/mpp/mpp.F90
shared/mpp/mpp_data.F90
shared/mpp/mpp_domains.F90
shared/mpp/mpp_io.F90
shared/mpp/mpp_memutils.F90
shared/mpp/mpp_parameter.F90
shared/mpp/mpp_pset.F90
shared/mpp/mpp_utilities.F90
shared/mpp/nsclock.c
shared/mpp/threadloc.c
shared/mpp/include/mpp_chksum.h
shared/mpp/include/mpp_chksum_int.h
shared/mpp/include/mpp_chksum_scalar.h
shared/mpp/include/mpp_comm.inc
shared/mpp/include/mpp_comm_mpi.inc
shared/mpp/include/mpp_comm_nocomm.inc
shared/mpp/include/mpp_comm_sma.inc
shared/mpp/include/mpp_data_mpi.inc
shared/mpp/include/mpp_data_nocomm.inc
shared/mpp/include/mpp_data_sma.inc
shared/mpp/include/mpp_do_get_boundary.h
shared/mpp/include/mpp_do_global_field.h
shared/mpp/include/mpp_do_redistribute.h
shared/mpp/include/mpp_do_update.h
shared/mpp/include/mpp_do_updateV.h
shared/mpp/include/mpp_do_updateV_ad.h
shared/mpp/include/mpp_do_update_ad.h
shared/mpp/include/mpp_domains_comm.inc
shared/mpp/include/mpp_domains_define.inc
shared/mpp/include/mpp_domains_misc.inc
shared/mpp/include/mpp_domains_reduce.inc
shared/mpp/include/mpp_domains_util.inc
shared/mpp/include/mpp_error_a_a.h
shared/mpp/include/mpp_error_a_s.h
shared/mpp/include/mpp_error_s_a.h
shared/mpp/include/mpp_error_s_s.h
shared/mpp/include/mpp_get_boundary.h
shared/mpp/include/mpp_global_field.h
shared/mpp/include/mpp_global_reduce.h
shared/mpp/include/mpp_global_sum.h
shared/mpp/include/mpp_global_sum_ad.h
shared/mpp/include/mpp_global_sum_tl.h
shared/mpp/include/mpp_io_connect.inc
shared/mpp/include/mpp_io_misc.inc
shared/mpp/include/mpp_io_read.inc
shared/mpp/include/mpp_io_util.inc
shared/mpp/include/mpp_io_write.inc
shared/mpp/include/mpp_read_2Ddecomp.h
shared/mpp/include/mpp_reduce_mpi.h
shared/mpp/include/mpp_reduce_nocomm.h
shared/mpp/include/mpp_reduce_sma.h
shared/mpp/include/mpp_sum.inc
shared/mpp/include/mpp_sum_mpi.h
shared/mpp/include/mpp_sum_nocomm.h
shared/mpp/include/mpp_sum_sma.h
shared/mpp/include/mpp_transmit.inc
shared/mpp/include/mpp_transmit_mpi.h
shared/mpp/include/mpp_transmit_nocomm.h
shared/mpp/include/mpp_transmit_sma.h
shared/mpp/include/mpp_update_domains2D.h
shared/mpp/include/mpp_update_domains2D_ad.h
shared/mpp/include/mpp_util.inc
shared/mpp/include/mpp_util_mpi.inc
shared/mpp/include/mpp_util_nocomm.inc
shared/mpp/include/mpp_util_sma.inc
shared/mpp/include/mpp_write.h
shared/mpp/include/mpp_write_2Ddecomp.h
shared/mpp/include/system_clock.h
shared/oda_tools/oda_core.F90
shared/oda_tools/oda_types.F90
shared/oda_tools/write_ocean_data.F90
shared/oda_tools/xbt_drop_rate_adjust.f90
shared/platform/platform.F90
shared/random_numbers/MersenneTwister.F90
shared/random_numbers/random_numbers.F90
shared/sat_vapor_pres/sat_vapor_pres.F90
shared/sat_vapor_pres/sat_vapor_pres_k.F90
shared/station_data/station_data.F90
shared/time_interp/time_interp.F90
shared/time_interp/time_interp_external.F90
shared/time_manager/get_cal_time.F90
shared/time_manager/time_manager.F90
shared/topography/gaussian_topog.F90
shared/topography/topography.F90
shared/tracer_manager/tracer_manager.F90
shared/tridiagonal/tridiagonal.F90
atmos_param/diag_integral/diag_integral.F90
atmos_param/monin_obukhov/monin_obukhov.F90
atmos_param/monin_obukhov/monin_obukhov_interfaces.h
atmos_param/monin_obukhov/monin_obukhov_kernel.F90
## compile mppnccombine.c, needed only if $npes > 1
# if ( ! -f $mppnccombine ) then
# cc -O -o $mppnccombine -I/usr/local/include -L/usr/local/lib $code_dir/postprocessing/mppnccombine/mppnccombine.c -lnetcdf
# endif
EOF_shared
set mkmf_lib = "$mkmf -f -m Makefile -a $code_dir -t $mkmfTemplate"
set lib_include_dirs = "$root/include $code_dir/shared/include $code_dir/shared/mpp/include"
# setup directory structure
set executable_h = $executable:h
source ./FMS_compile.csh
if ( $status ) exit $status
if ( ! -d $executable_h ) mkdir -p $executable_h
if ( ! -d $executable_h:h/lib_FMS ) mkdir -p $executable_h:h/lib_FMS
cd $root/exp
source ./ocean_compile.csh
if ( $status ) exit $status
# compile libs
set makeFile = Make_lib_FMS
cd $executable_h:h/lib_FMS
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p lib_FMS.a -c "$cppDefs" $pathnames_shared $root/include $code_dir/shared/include $code_dir/shared/mpp/include
make -f $makeFile
if( $status ) then
echo "Make failed to create lib_FMS.a"
exit
if( $type != MOM_solo) then
cd $root/exp
source ./ice_compile.csh
if ( $status ) exit $status
endif
if( $type == MOM_SIS) then
cd $root/exp
source ./land_null_compile.csh
if ( $status ) exit $status
# Build the Ocean and Ice Components library
# The list of source files that should be compiled for this component.
set srcList = ( mom5/ocean_bgc mom5/ocean_core mom5/ocean_diag mom5/ocean_blobs mom5/ocean_param/neutral mom5/ocean_param/sources mom5/ocean_param/lateral mom5/ocean_param/vertical mom5/ocean_param/gotm-4.0/include mom5/ocean_param/gotm-4.0/turbulence mom5/ocean_param/gotm-4.0/util mom5/ocean_tracers mom5/ocean_wave ocean_shared/generic_tracers ice_sis ice_param )
# setup directory structure
if ( ! -d $executable_h ) mkdir -p $executable_h
if ( ! -d $executable_h:h/lib_ocean ) mkdir -p $executable_h:h/lib_ocean
# compile libs
set makeFile = Make_lib_ocean
cd $executable_h:h/lib_ocean
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p lib_ocean.a -c "$cppDefs" -o "-I$executable_h:h/lib_FMS" $srcList $root/include $code_dir/shared/include $code_dir/shared/mpp/include
make -f $makeFile
if( $status ) then
echo "Make failed to create lib_ocean.a"
exit
endif
if( $type == MOM_solo ) then
# Build the MOM_solo executable
set srcList = ( mom5/drivers )
set makeFile = Make_MOM_solo
if ( ! -d $executable_h ) mkdir -p $executable_h
cd $executable_h
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p $executable:t -o "-I$executable_h:h/lib_FMS -I$executable_h:h/lib_ocean" -l "$executable_h:h/lib_ocean/lib_ocean.a $executable_h:h/lib_FMS/lib_FMS.a" $srcList
make -f $makeFile
if( $status ) then
echo "Make failed to create the MOM_solo executable "
exit
endif
exit
cd $root/exp
source ./atmos_null_compile.csh
if ( $status ) exit $status
endif
if( $type == MOM_SIS ) then
# Build the MOM_SIS executable
set srcList = ( atmos_null land_null coupler )
set makeFile = Make_MOM_SIS
if ( ! -d $executable_h ) mkdir -p $executable_h
cd $executable_h
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p $executable:t -o "-I$executable_h:h/lib_FMS -I$executable_h:h/lib_ocean" -l "$executable_h:h/lib_ocean/lib_ocean.a $executable_h:h/lib_FMS/lib_FMS.a" $srcList
make -f $makeFile
if( $status ) then
echo "Make failed to create the MOM_SIS executable "
exit
endif
exit
if( $type == EBM) then
cd $root/exp
source ./atmos_ebm_compile.csh
if ( $status ) exit $status
endif
if( $type == CM2M | $type == ESM2M | $type == ICCM ) then
# Build the am3 library
set pathnames_atmos_param = $code_dir/path_names_atmos_param # path to file containing list of source paths
cat > $pathnames_atmos_param <<EOF_atmos_param
atmos_param/betts_miller/betts_miller.F90
atmos_param/betts_miller/bm_massflux.F90
atmos_param/betts_miller/bm_omp.F90
atmos_param/cg_drag/cg_drag.F90
atmos_param/cloud_generator/betaDistribution.F90
atmos_param/cloud_generator/cloud_generator.F90
atmos_param/cloud_obs/cloud_obs.F90
atmos_param/cloud_rad/cloud_rad.F90
atmos_param/cloud_zonal/cloud_zonal.F90
atmos_param/clouds/clouds.F90
atmos_param/clubb/CLUBB_driver_SCM.F90
atmos_param/clubb/MG_microp_3D.F90
atmos_param/cosp/MISR_simulator/MISR_simulator.F
atmos_param/cosp/cosp.F90
atmos_param/cosp/cosp_constants.F90
atmos_param/cosp/cosp_defs.H
atmos_param/cosp/cosp_diagnostics.F90
atmos_param/cosp/cosp_driver.F90
atmos_param/cosp/cosp_io.F90
atmos_param/cosp/cosp_isccp_simulator.F90
atmos_param/cosp/cosp_lidar.F90
atmos_param/cosp/cosp_misr_simulator.F90
atmos_param/cosp/cosp_modis_simulator.F90
atmos_param/cosp/cosp_rttov_simulator.F90
atmos_param/cosp/cosp_simulator.F90
atmos_param/cosp/cosp_stats.F90
atmos_param/cosp/cosp_types.F90
atmos_param/cosp/cosp_utils.F90
atmos_param/cosp/MODIS_simulator/modis_simulator.F90
atmos_param/cosp/actsim/lidar_simulator.F90
atmos_param/cosp/actsim/lmd_ipsl_stats.F90
atmos_param/cosp/icarus-scops-3.7/congvec.H
atmos_param/cosp/icarus-scops-3.7/congvec.inc
atmos_param/cosp/icarus-scops-3.7/icarus.F90
atmos_param/cosp/icarus-scops-3.7/isccp_cloud_types.F
atmos_param/cosp/icarus-scops-3.7/scops.F
atmos_param/cosp/llnl/cosp_radar.F90
atmos_param/cosp/llnl/llnl_stats.F90
atmos_param/cosp/llnl/pf_to_mr.F
atmos_param/cosp/llnl/prec_scops.F
atmos_param/cosp/quickbeam/array_lib.F90
atmos_param/cosp/quickbeam/atmos_lib.F90
atmos_param/cosp/quickbeam/dsd.F90
atmos_param/cosp/quickbeam/format_input.F90
atmos_param/cosp/quickbeam/gases.F90
atmos_param/cosp/quickbeam/load_hydrometeor_classes.F90
atmos_param/cosp/quickbeam/load_mie_table.F90
atmos_param/cosp/quickbeam/math_lib.F90
atmos_param/cosp/quickbeam/mrgrnk.F90
atmos_param/cosp/quickbeam/optics_lib.F90
atmos_param/cosp/quickbeam/radar_simulator.F90
atmos_param/cosp/quickbeam/radar_simulator_types.F90
atmos_param/cosp/quickbeam/zeff.F90
atmos_param/cu_mo_trans/cu_mo_trans.F90
atmos_param/damping_driver/damping_driver.F90
atmos_param/diag_cloud/diag_cloud.F90
atmos_param/diag_cloud_rad/diag_cloud_rad.F90
atmos_param/diffusivity/diffusivity.F90
atmos_param/donner_deep/cumulus_closure_k.F90
atmos_param/donner_deep/donner_cape_k.F90
atmos_param/donner_deep/donner_cloud_model_k.F90
atmos_param/donner_deep/donner_deep.F90
atmos_param/donner_deep/donner_deep_k.F90
atmos_param/donner_deep/donner_deep_miz.F90
atmos_param/donner_deep/donner_lite_k.F90
atmos_param/donner_deep/donner_lscloud_k.F90
atmos_param/donner_deep/donner_meso_k.F90
atmos_param/donner_deep/donner_nml.h
atmos_param/donner_deep/donner_rad_k.F90
atmos_param/donner_deep/donner_types.F90
atmos_param/donner_deep/donner_types.h
atmos_param/donner_deep/donner_utilities_k.F90
atmos_param/donner_deep/fms_donner.F90
atmos_param/donner_deep/nonfms_donner.F90
atmos_param/donner_deep/wet_deposition_0D.F90
atmos_param/dry_adj/dry_adj.F90
atmos_param/edt/edt.F90
atmos_param/entrain/entrain.F90
atmos_param/fsrad/co2_data.F90
atmos_param/fsrad/co2int.F90
atmos_param/fsrad/fs_profile.F90
atmos_param/fsrad/fsrad.F90
atmos_param/fsrad/hconst.F90
atmos_param/fsrad/longwave.F90
atmos_param/fsrad/mcm_lw.F90
atmos_param/fsrad/mcm_sw_driver.F90
atmos_param/fsrad/mcm_swnew.F90
atmos_param/fsrad/mcm_swtbls.F90
atmos_param/fsrad/rad_diag.F90
atmos_param/fsrad/rdparm.F90
atmos_param/fsrad/shortwave.F90
atmos_param/grey_radiation/grey_radiation.F90
atmos_param/lin_cloud_microphys/lin_cloud_microphys.F90
atmos_param/lscale_cond/lscale_cond.F90
atmos_param/mg_drag/mg_drag.F90
atmos_param/moist_conv/moist_conv.F90
atmos_param/moist_processes/detr_ice_num.F90
atmos_param/moist_processes/moist_processes.F90
atmos_param/moist_processes/moist_processes_utils.F90
atmos_param/moist_processes/moistproc_kernels.F90
atmos_param/my25_turb/my25_turb.F90
atmos_param/physics_driver/physics_driver.F90
atmos_param/radiation_driver/radiation_driver.F90
atmos_param/ras/ras.F90
atmos_param/rh_clouds/rh_clouds.F90
atmos_param/sea_esf_rad/aerosol.F90
atmos_param/sea_esf_rad/aerosolrad_package.F90
atmos_param/sea_esf_rad/bulkphys_rad.F90
atmos_param/sea_esf_rad/cloud_spec.F90
atmos_param/sea_esf_rad/cloudrad_diagnostics.F90
atmos_param/sea_esf_rad/cloudrad_package.F90
atmos_param/sea_esf_rad/diag_clouds_W.F90
atmos_param/sea_esf_rad/donner_deep_clouds_W.F90
atmos_param/sea_esf_rad/esfsw_driver.F90
atmos_param/sea_esf_rad/esfsw_parameters.F90
atmos_param/sea_esf_rad/gas_tf.F90
atmos_param/sea_esf_rad/isccp_clouds.F90
atmos_param/sea_esf_rad/lhsw_driver.F90
atmos_param/sea_esf_rad/longwave_clouds.F90
atmos_param/sea_esf_rad/longwave_driver.F90
atmos_param/sea_esf_rad/longwave_fluxes.F90
atmos_param/sea_esf_rad/longwave_params.F90
atmos_param/sea_esf_rad/longwave_tables.F90
atmos_param/sea_esf_rad/lw_gases_stdtf.F90
atmos_param/sea_esf_rad/mgrp_prscr_clds.F90
atmos_param/sea_esf_rad/microphys_cloud.F90
atmos_param/sea_esf_rad/microphys_rad.F90
atmos_param/sea_esf_rad/optical_path.F90
atmos_param/sea_esf_rad/original_fms_rad.F90
atmos_param/sea_esf_rad/ozone.F90
atmos_param/sea_esf_rad/rad_output_file.F90
atmos_param/sea_esf_rad/rad_utilities.F90
atmos_param/sea_esf_rad/radiation_diag.F90
atmos_param/sea_esf_rad/radiative_gases.F90
atmos_param/sea_esf_rad/rh_based_clouds.F90
atmos_param/sea_esf_rad/sea_esf_rad.F90
atmos_param/sea_esf_rad/sealw99.F90
atmos_param/sea_esf_rad/shortwave_driver.F90
atmos_param/sea_esf_rad/specified_clouds_W.F90
atmos_param/sea_esf_rad/standalone_clouds.F90
atmos_param/sea_esf_rad/strat_clouds_W.F90
atmos_param/sea_esf_rad/uw_clouds_W.F90
atmos_param/sea_esf_rad/zetac_clouds_W.F90
atmos_param/shallow_conv/shallow_conv.F90
atmos_param/shallow_cu/conv_closures.F90
atmos_param/shallow_cu/conv_plumes.F90
atmos_param/shallow_cu/conv_plumes_k.F90
atmos_param/shallow_cu/conv_utilities.F90
atmos_param/shallow_cu/conv_utilities_k.F90
atmos_param/shallow_cu/deep_conv.F90
atmos_param/shallow_cu/uw_conv.F90
atmos_param/stable_bl_turb/stable_bl_turb.F90
atmos_param/strat_cloud/aerosol_cloud.F90
atmos_param/strat_cloud/check_nan.F90
atmos_param/strat_cloud/cldwat2m_micro.F90
atmos_param/strat_cloud/gamma_mg.F90
atmos_param/strat_cloud/mg_const.F90
atmos_param/strat_cloud/microphysics.F90
atmos_param/strat_cloud/morrison_gettelman_microp.F90
atmos_param/strat_cloud/nc_cond.F90
atmos_param/strat_cloud/polysvp.F90
atmos_param/strat_cloud/rotstayn_klein_mp.F90
atmos_param/strat_cloud/simple_pdf.F90
atmos_param/strat_cloud/strat_cloud.F90
atmos_param/strat_cloud/strat_cloud_legacy.F90
atmos_param/strat_cloud/strat_cloud_utilities.F90
atmos_param/strat_cloud/strat_netcdf.F90
atmos_param/strat_cloud/strat_nml.h
atmos_param/topo_drag/topo_drag.F90
atmos_param/vert_diff/vert_diff.F90
atmos_param/vert_diff_driver/vert_diff_driver.F90
atmos_param/vert_turb_driver/vert_turb_driver.F90
atmos_shared/atmos_nudge/atmos_nudge.F90
atmos_shared/interpolator/interpolator.F90
atmos_shared/tracer_driver/aer_ccn_act/aer_ccn_act.F90
atmos_shared/tracer_driver/aer_ccn_act/aer_ccn_act_k.F90
atmos_shared/tracer_driver/aer_ccn_act/aer_in_act.F90
atmos_shared/tracer_driver/aer_ccn_act/aerosol_params.F90
atmos_shared/tracer_driver/aer_ccn_act/ice_nucl.F90
atmos_shared/tracer_driver/atmos_age_tracer.F90
atmos_shared/tracer_driver/atmos_carbon_aerosol.F90
atmos_shared/tracer_driver/atmos_ch3i.F90
atmos_shared/tracer_driver/atmos_co2.F90
atmos_shared/tracer_driver/atmos_convection_tracer.F90
atmos_shared/tracer_driver/atmos_dust.F90
atmos_shared/tracer_driver/atmos_radon.F90
atmos_shared/tracer_driver/atmos_sea_salt.F90
atmos_shared/tracer_driver/atmos_soa.F90
atmos_shared/tracer_driver/atmos_sulfate.F90
atmos_shared/tracer_driver/atmos_sulfur_hex.F90
atmos_shared/tracer_driver/atmos_tracer_driver.F90
atmos_shared/tracer_driver/atmos_tracer_utilities.F90
atmos_shared/tracer_driver/stratchem/strat_chem_driver.F90
atmos_shared/tracer_driver/stratchem/strat_chem_model.F90
atmos_shared/tracer_driver/tropchem/m_tracname.F90
atmos_shared/tracer_driver/tropchem/mo_chem_utls.F90
atmos_shared/tracer_driver/tropchem/mo_chemdr.F90
atmos_shared/tracer_driver/tropchem/mo_chemini.F90
atmos_shared/tracer_driver/tropchem/mo_exp_slv.F90
atmos_shared/tracer_driver/tropchem/mo_fastjx.F90
atmos_shared/tracer_driver/tropchem/mo_fphoto.F90
atmos_shared/tracer_driver/tropchem/mo_hook.F90
atmos_shared/tracer_driver/tropchem/mo_imp_slv.F90
atmos_shared/tracer_driver/tropchem/mo_jpl.F90
atmos_shared/tracer_driver/tropchem/mo_photo.F90
atmos_shared/tracer_driver/tropchem/mo_read_sim_chm.F90
atmos_shared/tracer_driver/tropchem/mo_rodas_slv.F90
atmos_shared/tracer_driver/tropchem/mo_setinv.F90
atmos_shared/tracer_driver/tropchem/mo_setsox.F90
atmos_shared/tracer_driver/tropchem/mo_usrrxt.F90
atmos_shared/tracer_driver/tropchem/moz.mat.F90
atmos_shared/tracer_driver/tropchem/moz.mods.F90
atmos_shared/tracer_driver/tropchem/moz.subs.F90
atmos_shared/tracer_driver/tropchem/strat_chem_utilities.F90
atmos_shared/tracer_driver/tropchem/tropchem_driver.F90
atmos_shared/vert_advection/vert_advection.F90
EOF_atmos_param
# setup directory structure
if ( ! -d $executable_h ) mkdir -p $executable_h
if ( ! -d $executable_h:h/lib_atmos_phys ) mkdir -p $executable_h:h/lib_atmos_phys
# compile libs
set makeFile = Make_lib_atmos_phys
cd $executable_h:h/lib_atmos_phys
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p lib_atmos_phys.a -c "$cppDefs" -o "-I$executable_h:h/lib_FMS" $pathnames_atmos_param $root/include $code_dir/shared/include $code_dir/shared/mpp/include
make -f $makeFile
if( $status ) then
echo "Make failed to create lib_atmos_phys.a"
exit
endif
cd $root/exp
source ./atmos_phys_compile.csh
if ( $status ) exit $status
endif
if( $type == CM2M | $type == ESM2M ) then
# Build the atmos_FV library
set pathnames_atmos_fv = $code_dir/path_names_atmos_fv # path to file containing list of source paths
cat > $pathnames_atmos_fv <<EOF_atmos_fv
atmos_coupled/atmos_model.F90
atmos_fv_dynamics/driver/coupled/atmosphere.F90
atmos_fv_dynamics/driver/coupled/fv_physics.F90
atmos_fv_dynamics/model/dyn_core.F90
atmos_fv_dynamics/model/ecmfft.F90
atmos_fv_dynamics/model/fill_module.F90
atmos_fv_dynamics/model/fv_arrays.F90
atmos_fv_dynamics/model/fv_arrays.h
atmos_fv_dynamics/model/fv_dynamics.F90
atmos_fv_dynamics/model/fv_pack.F90
atmos_fv_dynamics/model/fv_point.inc
atmos_fv_dynamics/model/mapz_module.F90
atmos_fv_dynamics/model/pft_module.F90
atmos_fv_dynamics/model/shr_kind_mod.F90
atmos_fv_dynamics/model/sw_core.F90
atmos_fv_dynamics/model/tp_core.F90
atmos_fv_dynamics/model/tracer_2d.F90
atmos_fv_dynamics/model/update_fv_phys.F90
atmos_fv_dynamics/tools/age_of_air.F90
atmos_fv_dynamics/tools/fv_diagnostics.F90
atmos_fv_dynamics/tools/fv_restart.F90
atmos_fv_dynamics/tools/getmax.F90
atmos_fv_dynamics/tools/gmean.F90
atmos_fv_dynamics/tools/init_dry_atm.F90
atmos_fv_dynamics/tools/init_sw_ic.F90
atmos_fv_dynamics/tools/mod_comm.F90
atmos_fv_dynamics/tools/par_vecsum.F90
atmos_fv_dynamics/tools/pmaxmin.F90
atmos_fv_dynamics/tools/pv_module.F90
atmos_fv_dynamics/tools/set_eta.F90
atmos_fv_dynamics/tools/timingModule.F90
atmos_fv_dynamics/tools/upper.F90
EOF_atmos_fv
# setup directory structure
if ( ! -d $executable_h ) mkdir -p $executable_h
if ( ! -d $executable_h:h/lib_atmos_phys_fv ) mkdir -p $executable_h:h/lib_atmos_fv
# compile libs
set makeFile = Make_lib_atmos_fv
cd $executable_h:h/lib_atmos_fv
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p lib_atmos_fv.a -c "$cppDefs" -o "-I$executable_h:h/lib_FMS -I$executable_h:h/lib_atmos_phys" $pathnames_atmos_fv $root/include $code_dir/shared/include $code_dir/shared/mpp/include
make -f $makeFile
if( $status ) then
echo "Make failed to create lib_atmos_fv.a"
exit
endif
endif
if( $type == CM2M | $type == ICCM ) then
# Build the land_lad library
set pathnames_land_lad = $code_dir/path_names_land_lad # path to file containing list of source paths
##LAND Component
# The list of source files that should be compiled for this component.
cat > $pathnames_land_lad <<EOF_land_lad
land_lad/land_model.F90
land_lad/land_types.F90
land_lad/numerics.F90
land_lad/soil/land_properties.F90
land_lad/soil/rivers.F90
land_lad/soil/soil.F90
land_lad/vegetation/vegetation.F90
land_param/climap_albedo.F90
EOF_land_lad
# setup directory structure
if ( ! -d $executable_h ) mkdir -p $executable_h
if ( ! -d $executable_h:h/lib_land_lad ) mkdir -p $executable_h:h/lib_land_lad
# compile libs
set makeFile = Make_lib_land_lad
cd $executable_h:h/lib_land_lad
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p lib_land_lad.a -c "$cppDefs" -o "-I$executable_h:h/lib_FMS" $pathnames_land_lad $root/include $code_dir/shared/include $code_dir/shared/mpp/include
make -f $makeFile
if( $status ) then
echo "Make failed to create lib_land_lad.a"
exit
cd $root/exp
source ./atmos_fv_compile.csh
if ( $status ) exit $status
endif
if( $type == CM2M | $type == ICCM | $type == EBM ) then
cd $root/exp
source ./land_lad_compile.csh
if ( $status ) exit $status
endif
if( $type == CM2M ) then
# Build the CM2M executable
set srcList = ( coupler )
set makeFile = Make_CM2M
if ( ! -d $executable_h ) mkdir -p $executable_h
cd $executable_h
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p $executable:t -o "-I$executable_h:h/lib_FMS -I$executable_h:h/lib_ocean -I$executable_h:h/lib_atmos_fv -I$executable_h:h/lib_atmos_phys -I$executable_h:h/lib_land_lad" -l "$executable_h:h/lib_ocean/lib_ocean.a $executable_h:h/lib_atmos_fv/lib_atmos_fv.a $executable_h:h/lib_atmos_phys/lib_atmos_phys.a $executable_h:h/lib_land_lad/lib_land_lad.a $executable_h:h/lib_FMS/lib_FMS.a" $srcList
make -f $makeFile
if( $status ) then
echo "Make failed to create the CM2M executable "
exit
endif
exit
endif
if( $type == ESM2M ) then
# Build the land_lad2 library
##LAND Component
# The list of source files that should be compiled for this component.
set pathnames_land_lad2 = $code_dir/path_names_land_lad2 # path to file containing list of source paths
cat > $pathnames_land_lad2 <<EOF_land_lad2
land_lad2/canopy_air/cana_tile.F90
land_lad2/canopy_air/canopy_air.F90
land_lad2/land_constants.F90
land_lad2/land_data.F90
land_lad2/land_model.F90
land_lad2/land_tile.F90
land_lad2/glacier/glac_tile.F90
land_lad2/glacier/glacier.F90
land_lad2/lake/lake.F90
land_lad2/lake/lake_tile.F90
land_lad2/river/river.F90
land_lad2/river/river_physics.F90
land_lad2/river/river_type.F90
land_lad2/shared/nf_utils/getput.inc
land_lad2/shared/nf_utils/getput_compressed.inc
land_lad2/shared/nf_utils/nf_utils.F90
land_lad2/shared/nf_utils/nfc.F90
land_lad2/shared/nf_utils/nfu.F90
land_lad2/shared/debug.inc
land_lad2/shared/land_debug.F90
land_lad2/shared/land_io.F90
land_lad2/shared/land_numerics.F90
land_lad2/shared/land_tile_diag.F90
land_lad2/shared/land_tile_diag_buff.F90
land_lad2/shared/land_tile_diag_sel.F90
land_lad2/shared/land_tile_io.F90
land_lad2/shared/land_utils.F90
land_lad2/shared/sphum.F90
land_lad2/shared/table_printer.F90
land_lad2/snow/snow.F90
land_lad2/snow/snow_tile.F90
land_lad2/soil/soil.F90
land_lad2/soil/soil_tile.F90
land_lad2/soil/uptake.F90
land_lad2/topo_rough/topo_rough.F90
land_lad2/transitions/transitions.F90
land_lad2/vegetation/read_remap_cohort_data.inc
land_lad2/vegetation/vegetation.F90
land_lad2/vegetation/vegn_cohort.F90
land_lad2/vegetation/vegn_cohort_io.F90
land_lad2/vegetation/vegn_cohort_io.inc
land_lad2/vegetation/vegn_data.F90
land_lad2/vegetation/vegn_disturbance.F90
land_lad2/vegetation/vegn_dynamics.F90
land_lad2/vegetation/vegn_harvesting.F90
land_lad2/vegetation/vegn_photosynthesis.F90
land_lad2/vegetation/vegn_radiation.F90
land_lad2/vegetation/vegn_static_override.F90
land_lad2/vegetation/vegn_tile.F90
EOF_land_lad2
set srcList = ( )
# setup directory structure
if ( ! -d $executable_h ) mkdir -p $executable_h
if ( ! -d $executable_h:h/lib_land_lad2 ) mkdir -p $executable_h:h/lib_land_lad2
# compile libs
set makeFile = Make_lib_land_lad2
cd $executable_h:h/lib_land_lad2
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p lib_land_lad2.a -c "-DUSE_LOG_DIAG_FIELD_INFO $cppDefs" -o "-I$executable_h:h/lib_FMS" $srcList $pathnames_land_lad2 $root/include $code_dir/shared/include $code_dir/shared/mpp/include
make -f $makeFile
if( $status ) then
echo "Make failed to create lib_land_lad2.a"
exit
cd $root/exp
source ./land_lad2_compile.csh
if ( $status ) exit $status
endif
if( $type == ICCM ) then
cd $root/exp
source ./atmos_bg_compile.csh
if ( $status ) exit $status
endif
if( $type == ESM2M ) then
# Build the ESM2M executable
# Build the executable
set mkmf_exec = "$mkmf -f -m Makefile -a $code_dir -t $mkmfTemplate -p $executable:t"
mkdir -p $executable:h
cd $executable:h
if( $type == MOM_solo ) then
set srcList = ( mom5/drivers )
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean"
set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_FMS/lib_FMS.a"
else if( $type == MOM_SIS ) then
set srcList = ( coupler )
set makeFile = Make_ESM2M
if ( ! -d $executable_h ) mkdir -p $executable_h
cd $executable_h
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p $executable:t -o "-I$executable_h:h/lib_FMS -I$executable_h:h/lib_ocean -I$executable_h:h/lib_atmos_fv -I$executable_h:h/lib_atmos_phys -I$executable_h:h/lib_land_lad2" -l "$executable_h:h/lib_ocean/lib_ocean.a $executable_h:h/lib_atmos_fv/lib_atmos_fv.a $executable_h:h/lib_atmos_phys/lib_atmos_phys.a $executable_h:h/lib_land_lad2/lib_land_lad2.a $executable_h:h/lib_FMS/lib_FMS.a" $srcList
make -f $makeFile
if( $status ) then
echo "Make failed to create the ESM2M executable "
exit
endif
exit
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean -I$executable:h:h/lib_ice -I$executable:h:h/lib_atmos_null -I$executable:h:h/lib_land_null"
set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_ice/lib_ice.a $executable:h:h/lib_atmos_null/lib_atmos_null.a $executable:h:h/lib_land_null/lib_land_null.a $executable:h:h/lib_FMS/lib_FMS.a"
else if( $type == EBM ) then
set srcList = ( coupler )
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean -I$executable:h:h/lib_ice -I$executable:h:h/lib_atmos_ebm -I$executable:h:h/lib_land_lad"
set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_ice/lib_ice.a $executable:h:h/lib_atmos_ebm/lib_atmos_ebm.a $executable:h:h/lib_land_lad/lib_land_lad.a $executable:h:h/lib_FMS/lib_FMS.a"
else if( $type == CM2M ) then
set srcList = ( coupler )
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean -I$executable:h:h/lib_ice -I$executable:h:h/lib_atmos_fv -I$executable:h:h/lib_atmos_phys -I$executable:h:h/lib_land_lad"
set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_ice/lib_ice.a $executable:h:h/lib_atmos_fv/lib_atmos_fv.a $executable:h:h/lib_atmos_phys/lib_atmos_phys.a $executable:h:h/lib_land_lad/lib_land_lad.a $executable:h:h/lib_FMS/lib_FMS.a"
else if( $type == ESM2M ) then
set srcList = ( coupler )
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean -I$executable:h:h/lib_ice -I$executable:h:h/lib_atmos_fv -I$executable:h:h/lib_atmos_phys -I$executable:h:h/lib_land_lad2"
set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_ice/lib_ice.a $executable:h:h/lib_atmos_fv/lib_atmos_fv.a $executable:h:h/lib_atmos_phys/lib_atmos_phys.a $executable:h:h/lib_land_lad2/lib_land_lad2.a $executable:h:h/lib_FMS/lib_FMS.a"
else if( $type == ICCM ) then
set srcList = ( coupler )
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean -I$executable:h:h/lib_ice -I$executable:h:h/lib_atmos_bg -I$executable:h:h/lib_atmos_phys -I$executable:h:h/lib_land_lad"
set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_ice/lib_ice.a $executable:h:h/lib_atmos_bg/lib_atmos_bg.a $executable:h:h/lib_atmos_phys/lib_atmos_phys.a $executable:h:h/lib_land_lad/lib_land_lad.a $executable:h:h/lib_FMS/lib_FMS.a"
endif
if( $type == ICCM ) then
# Build the atmos_BG library
set pathnames_atmos_bg = $code_dir/path_names_atmos_bg # path to file containing list of source paths
cat > $pathnames_atmos_bg <<EOF_atmos_bg
atmos_coupled/atmos_model.F90
atmos_bgrid/driver/coupled/atmosphere.F90
atmos_bgrid/driver/coupled/bgrid_physics.F90
atmos_bgrid/model/bgrid_advection.F90
atmos_bgrid/model/bgrid_conserve_energy.F90
atmos_bgrid/model/bgrid_core.F90
atmos_bgrid/model/bgrid_core_driver.F90
atmos_bgrid/model/bgrid_horiz_adjust.F90
atmos_bgrid/model/bgrid_horiz_diff.F90
atmos_bgrid/model/bgrid_sponge.F90
atmos_bgrid/model/bgrid_vert_adjust.F90
atmos_bgrid/tools/bgrid_change_grid.F90
atmos_bgrid/tools/bgrid_cold_start.F90
atmos_bgrid/tools/bgrid_diagnostics.F90
atmos_bgrid/tools/bgrid_halo.F90
atmos_bgrid/tools/bgrid_horiz.F90
atmos_bgrid/tools/bgrid_integrals.F90
atmos_bgrid/tools/bgrid_masks.F90
atmos_bgrid/tools/bgrid_polar_filter.F90
atmos_bgrid/tools/bgrid_prog_var.F90
atmos_bgrid/tools/bgrid_vert.F90
EOF_atmos_bg
# setup directory structure
if ( ! -d $executable_h ) mkdir -p $executable_h
if ( ! -d $executable_h:h/lib_atmos_bg ) mkdir -p $executable_h:h/lib_atmos_bg
# compile libs
set makeFile = Make_lib_atmos_bg
cd $executable_h:h/lib_atmos_bg
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p lib_atmos_bg.a -c "$cppDefs" -o "-I$executable_h:h/lib_FMS -I$executable_h:h/lib_atmos_phys" $pathnames_atmos_bg $root/include $code_dir/shared/include $code_dir/shared/mpp/include
make -f $makeFile
$mkmf_exec -o "$includes" -l "$libs" $srcList
make
if( $status ) then
echo "Make failed to create lib_atmos_bg.a"
exit
endif
endif
echo "Make failed to create the $type executable"
exit 1
endif
if( $type == ICCM ) then
# Build the ICCM executable
set srcList = ( coupler )
set makeFile = Make_ICCM
if ( ! -d $executable_h ) mkdir -p $executable_h
cd $executable_h
$mkmf -f -m $makeFile -a $code_dir -t $mkmfTemplate -p $executable:t -o "-I$executable_h:h/lib_FMS -I$executable_h:h/lib_ocean -I$executable_h:h/lib_atmos_bg -I$executable_h:h/lib_atmos_phys -I$executable_h:h/lib_land_lad" -l "$executable_h:h/lib_ocean/lib_ocean.a $executable_h:h/lib_atmos_bg/lib_atmos_bg.a $executable_h:h/lib_atmos_phys/lib_atmos_phys.a $executable_h:h/lib_land_lad/lib_land_lad.a $executable_h:h/lib_FMS/lib_FMS.a" $srcList
make -f $makeFile
if( $status ) then
echo "Make failed to create the ICCM executable "
exit
endif
exit
endif
exit

15
exp/atmos_null_compile.csh

@ -0,0 +1,15 @@
# Build the null atmos library
set srcList = ( atmos_null atmos_param/diag_integral atmos_param/monin_obukhov )
set lib_name = "lib_atmos_null"
mkdir -p $executable:h:h/$lib_name
cd $executable:h:h/$lib_name
$mkmf_lib -p $lib_name.a -c "$cppDefs" -o "-I$executable:h:h/lib_FMS" $srcList $lib_include_dirs
make
if( $status ) then
echo "Make failed to create $lib_name.a"
exit 1
endif

16
exp/ice_compile.csh

@ -0,0 +1,16 @@
# Build the Ice library
# The list of source files that should be compiled for this component.
set srcList = ( ice_sis ice_param )
set lib_name = "lib_ice"
mkdir -p $executable:h:h/$lib_name
cd $executable:h:h/$lib_name
$mkmf_lib -p $lib_name.a -c "$cppDefs" -o "-I$executable:h:h/lib_FMS" $srcList $lib_include_dirs
make
if( $status ) then
echo "Make failed to create $lib_name.a"
exit 1
endif

15
exp/land_null_compile.csh

@ -0,0 +1,15 @@
# Build the null land library
set srcList = ( land_null )
set lib_name = "lib_land_null"
mkdir -p $executable:h:h/$lib_name
cd $executable:h:h/$lib_name
$mkmf_lib -p $lib_name.a -c "$cppDefs" -o "-I$executable:h:h/lib_FMS" $srcList $lib_include_dirs
make
if( $status ) then
echo "Make failed to create $lib_name.a"
exit 1
endif

15
exp/ocean_compile.csh

@ -0,0 +1,15 @@
# Build the Ocean library
set srcList = ( mom5/ocean_bgc mom5/ocean_core mom5/ocean_diag mom5/ocean_blobs mom5/ocean_param/neutral mom5/ocean_param/sources mom5/ocean_param/lateral mom5/ocean_param/vertical mom5/ocean_param/gotm-4.0/include mom5/ocean_param/gotm-4.0/turbulence mom5/ocean_param/gotm-4.0/util mom5/ocean_tracers mom5/ocean_wave ocean_shared/generic_tracers )
set lib_name = "lib_ocean"
mkdir -p $executable:h:h/$lib_name
cd $executable:h:h/$lib_name
$mkmf_lib -p $lib_name.a -c "$cppDefs" -o "-I$executable:h:h/lib_FMS" $srcList $lib_include_dirs
make
if( $status ) then
echo "Make failed to create $lib_name.a"
exit 1
endif

7
src/coupler/flux_exchange.F90

@ -1028,6 +1028,7 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
allocate( ice_ocean_boundary%sw_flux_vis_dif (is:ie,js:je) ) ; ice_ocean_boundary%sw_flux_vis_dif = 0.0
allocate( ice_ocean_boundary%sw_flux_nir_dir (is:ie,js:je) ) ; ice_ocean_boundary%sw_flux_nir_dir = 0.0
allocate( ice_ocean_boundary%sw_flux_nir_dif (is:ie,js:je) ) ; ice_ocean_boundary%sw_flux_nir_dif = 0.0
allocate( ice_ocean_boundary%coszen (is:ie,js:je) ) ; ice_ocean_boundary%coszen = 0.0
allocate( ice_ocean_boundary%lprec (is:ie,js:je) ) ; ice_ocean_boundary%lprec = 0.0
allocate( ice_ocean_boundary%fprec (is:ie,js:je) ) ; ice_ocean_boundary%fprec = 0.0
allocate( ice_ocean_boundary%runoff (is:ie,js:je) ) ; ice_ocean_boundary%runoff = 0.0
@ -1716,7 +1717,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar
call get_from_xgrid (Ice%t_surf, 'OCN', ex_t_surf, xmap_sfc)
end if
Land_Ice_Atmos_Boundary%t = Land_Ice_Atmos_Boundary%t ** 0.25
Land_Ice_Atmos_Boundary%t = max(1600000000.0,Land_Ice_Atmos_Boundary%t) ** 0.25
!Balaji: data_override calls moved here from coupler_main
call data_override('ATM', 't', Land_Ice_Atmos_Boundary%t, Time)
call data_override('ATM', 'albedo', Land_Ice_Atmos_Boundary%albedo, Time)
@ -2796,6 +2797,9 @@ subroutine flux_ice_to_ocean ( Time, Ice, Ocean, Ice_Ocean_Boundary )
if(ASSOCIATED(Ice_Ocean_Boundary%mi ) ) call flux_ice_to_ocean_redistribute( Ice, Ocean, &
Ice%mi, Ice_Ocean_Boundary%mi , Ice_Ocean_Boundary%xtype, .FALSE. )
if(ASSOCIATED(Ice_Ocean_Boundary%coszen) ) call flux_ice_to_ocean_redistribute( Ice, Ocean, &
Ice%coszen, Ice_Ocean_Boundary%coszen, Ice_Ocean_Boundary%xtype, .FALSE. )
! Extra fluxes
do n = 1, Ice_Ocean_Boundary%fluxes%num_bcs !{
do m = 1, Ice_Ocean_Boundary%fluxes%bc(n)%num_fields !{
@ -2863,6 +2867,7 @@ subroutine flux_ice_to_ocean ( Time, Ice, Ocean, Ice_Ocean_Boundary )
call data_override('OCN', 'sw_flux_nir_dif', Ice_Ocean_Boundary%sw_flux_nir_dif , Time )
call data_override('OCN', 'sw_flux_vis_dir', Ice_Ocean_Boundary%sw_flux_vis_dir , Time )
call data_override('OCN', 'sw_flux_vis_dif', Ice_Ocean_Boundary%sw_flux_vis_dif , Time )
call data_override('OCN', 'coszen', Ice_Ocean_Boundary%coszen , Time )
call data_override('OCN', 'lprec', Ice_Ocean_Boundary%lprec , Time )
call data_override('OCN', 'fprec', Ice_Ocean_Boundary%fprec , Time )
call data_override('OCN', 'runoff', Ice_Ocean_Boundary%runoff , Time )

80
src/ice_sis/ice_bergs.F90

@ -1610,16 +1610,16 @@ integer :: stderrunit
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: jsd,jsc,jec,jed=',grd%jsd,grd%jsc,grd%jec,grd%jed
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: i1,i2,i=',i1,i2,i
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: j1,j2,j=',j1,j2,j
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lon1,lon2=',lon1,lon2,berg%lon
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lat1,lat2=',lat1,lat2,berg%lat
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: u1,u2,u0=',uvel1,uvel2,berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: v1,v2,v0=',vvel1,vvel2,berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2=',dt*ax1,dt*ax2
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2=',dt*ay1,dt*ay2
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u0=',dt*uvel1,dt*uvel2,dt*berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v0=',dt*vvel1,dt*vvel2,dt*berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2 (deg)=',dt*u1,dt*u2
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2 (deg)=',dt*v1,dt*v2
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lon1,lon2=',lon1,lon2,berg%lon
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lat1,lat2=',lat1,lat2,berg%lat
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: u1,u2,u0=',uvel1,uvel2,berg%uvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: v1,v2,v0=',vvel1,vvel2,berg%vvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2=',dt*ax1,dt*ax2
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2=',dt*ay1,dt*ay2
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u0=',dt*uvel1,dt*uvel2,dt*berg%uvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v0=',dt*vvel1,dt*vvel2,dt*berg%vvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2 (deg)=',dt*u1,dt*u2
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2 (deg)=',dt*v1,dt*v2
write(stderrunit,*) 'Acceleration terms for position 1'
error_flag=pos_within_cell(grd, lon1, lat1, i1, j1, xi, yj)
call accel(bergs, berg, i1, j1, xi, yj, lat1, uvel1, vvel1, uvel1, vvel1, dt_2, ax1, ay1, debug_flag=.true.)
@ -1663,16 +1663,16 @@ integer :: stderrunit
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: jsd,jsc,jec,jed=',grd%jsd,grd%jsc,grd%jec,grd%jed
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: i1,i2,i3,i=',i1,i2,i3,i
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: j1,j2,j3,j=',j1,j2,j3,j
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lon1,lon2,lon3=',lon1,lon2,lon3,berg%lon
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lat1,lat2,lat3=',lat1,lat2,lat3,berg%lat
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: u1,u2,u3,u0=',uvel1,uvel2,uvel3,berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: v1,v2,v3,v0=',vvel1,vvel2,vvel3,berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2,ax3=',dt*ax1,dt*ax2,dt*ax3
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2,ay3=',dt*ay1,dt*ay2,dt*ay3
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u0=',dt*uvel1,dt*uvel2,dt*uvel3,dt*berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v0=',dt*vvel1,dt*vvel2,dt*vvel3,dt*berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3 (deg)=',dt*u1,dt*u2,dt*u3
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3 (deg)=',dt*v1,dt*v2,dt*v3
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lon1,lon2,lon3=',lon1,lon2,lon3,berg%lon
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lat1,lat2,lat3=',lat1,lat2,lat3,berg%lat
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: u1,u2,u3,u0=',uvel1,uvel2,uvel3,berg%uvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: v1,v2,v3,v0=',vvel1,vvel2,vvel3,berg%vvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2,ax3=',dt*ax1,dt*ax2,dt*ax3
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2,ay3=',dt*ay1,dt*ay2,dt*ay3
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u0=',dt*uvel1,dt*uvel2,dt*uvel3,dt*berg%uvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v0=',dt*vvel1,dt*vvel2,dt*vvel3,dt*berg%vvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3 (deg)=',dt*u1,dt*u2,dt*u3
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3 (deg)=',dt*v1,dt*v2,dt*v3
write(stderrunit,*) 'Acceleration terms for position 1'
error_flag=pos_within_cell(grd, lon1, lat1, i1, j1, xi, yj)
call accel(bergs, berg, i1, j1, xi, yj, lat1, uvel1, vvel1, uvel1, vvel1, dt_2, ax1, ay1, debug_flag=.true.)
@ -1717,16 +1717,16 @@ integer :: stderrunit
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: jsd,jsc,jec,jed=',grd%jsd,grd%jsc,grd%jec,grd%jed
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: i1,i2,i3,i4,i=',i1,i2,i3,i4,i
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: j1,j2,j3,j4,j=',j1,j2,j3,j4,j
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lon1,lon2,lon3,lon4=',lon1,lon2,lon3,lon4,berg%lon
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lat1,lat2,lat3,lat4=',lat1,lat2,lat3,lat4,berg%lat
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: u1,u2,u3,u4,u0=',uvel1,uvel2,uvel3,uvel4,berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: v1,v2,v3,v4,v0=',vvel1,vvel2,vvel3,vvel4,berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2,ax3,ax4=',dt*ax1,dt*ax2,dt*ax3,dt*ax4
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2,ay3,ay4=',dt*ay1,dt*ay2,dt*ay3,dt*ay4
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4,u0=',dt*uvel1,dt*uvel2,dt*uvel3,dt*uvel4,dt*berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4,v0=',dt*vvel1,dt*vvel2,dt*vvel3,dt*vvel4,dt*berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4 (deg)=',dt*u1,dt*u2,dt*u3,dt*u4
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4 (deg)=',dt*v1,dt*v2,dt*v3,dt*v4
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lon1,lon2,lon3,lon4=',lon1,lon2,lon3,lon4,berg%lon
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lat1,lat2,lat3,lat4=',lat1,lat2,lat3,lat4,berg%lat
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: u1,u2,u3,u4,u0=',uvel1,uvel2,uvel3,uvel4,berg%uvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: v1,v2,v3,v4,v0=',vvel1,vvel2,vvel3,vvel4,berg%vvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2,ax3,ax4=',dt*ax1,dt*ax2,dt*ax3,dt*ax4
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2,ay3,ay4=',dt*ay1,dt*ay2,dt*ay3,dt*ay4
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4,u0=',dt*uvel1,dt*uvel2,dt*uvel3,dt*uvel4,dt*berg%uvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4,v0=',dt*vvel1,dt*vvel2,dt*vvel3,dt*vvel4,dt*berg%vvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4 (deg)=',dt*u1,dt*u2,dt*u3,dt*u4
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4 (deg)=',dt*v1,dt*v2,dt*v3,dt*v4
write(stderrunit,*) 'Acceleration terms for position 1'
error_flag=pos_within_cell(grd, lon1, lat1, i1, j1, xi, yj)
call accel(bergs, berg, i1, j1, xi, yj, lat1, uvel1, vvel1, uvel1, vvel1, dt_2, ax1, ay1, debug_flag=.true.)
@ -1779,21 +1779,21 @@ integer :: stderrunit
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: jsd,jsc,jec,jed=',grd%jsd,grd%jsc,grd%jec,grd%jed
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: i1,i2,i3,i4,i=',i1,i2,i3,i4,i
write(stderrunit,'(a,6i5)') 'diamonds, evolve_iceberg: j1,j2,j3,j4,j=',j1,j2,j3,j4,j
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lon1,lon2,lon3,lon4,lonn=',lon1,lon2,lon3,lon4,lonn,berg%lon
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: lat1,lat2,lat3,lat4,latn=',lat1,lat2,lat3,lat4,latn,berg%lat
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: u1,u2,u3,u4,un,u0=',uvel1,uvel2,uvel3,uvel4,uveln,berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: v1,v2,v3,v4,vn,v0=',vvel1,vvel2,vvel3,vvel4,vveln,berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2,ax3,ax4,axn=',&
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lon1,lon2,lon3,lon4,lonn=',lon1,lon2,lon3,lon4,lonn,berg%lon
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: lat1,lat2,lat3,lat4,latn=',lat1,lat2,lat3,lat4,latn,berg%lat
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: u1,u2,u3,u4,un,u0=',uvel1,uvel2,uvel3,uvel4,uveln,berg%uvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: v1,v2,v3,v4,vn,v0=',vvel1,vvel2,vvel3,vvel4,vveln,berg%vvel
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ax1,ax2,ax3,ax4,axn=',&
& dt*ax1,dt*ax2,dt*ax3,dt*ax4,dt_6*( (ax1+ax4)+2.*(ax2+ax3) )
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2,ay3,ay4,ayn=',&
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* ay1,ay2,ay3,ay4,ayn=',&
& dt*ay1,dt*ay2,dt*ay3,dt*ay4,dt_6*( (ay1+ay4)+2.*(ay2+ay3) )
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4,un,u0=',&
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4,un,u0=',&
& dt*uvel1,dt*uvel2,dt*uvel3,dt*uvel4,dt*uveln,dt*berg%uvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4,vn,v0=',&
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4,vn,v0=',&
& dt*vvel1,dt*vvel2,dt*vvel3,dt*vvel4,dt*vveln,dt*berg%vvel
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4,u_rk (deg)=',&
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* u1,u2,u3,u4,u_rk (deg)=',&
& dt*u1,dt*u2,dt*u3,dt*u4,dt_6*( (u1+u4)+2.*(u2+u3) )
write(stderrunit,'(a,6es9.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4,v_rk (deg)=',&
write(stderrunit,'(a,6es10.3)') 'diamonds, evolve_iceberg: dt* v1,v2,v3,v4,v_rk (deg)=',&
& dt*v1,dt*v2,dt*v3,dt*v4,dt_6*( (v1+v4)+2.*(v2+v3) )
write(stderrunit,*) 'diamonds, evolve_iceberg: on_tangential_plane=',on_tangential_plane
write(stderrunit,*) 'Acceleration terms for position 1'

8
src/ice_sis/ice_dyn.F90

@ -167,7 +167,7 @@ contains
+ sea_lev(i,j+1)-sea_lev(i,j)))/dyv(i,j)
enddo
enddo
! put ice/snow mass and concentration on v-grid
call t_to_uv(ci*(hi*DI+hs*DS), miv)
call t_to_uv(ci, civ)
@ -185,7 +185,7 @@ contains
endif
enddo
enddo
do j = jsc, jec
do i = isc, iec
if((wetv(i,j)>0.5) .and. miv(i,j) > MIV_MIN ) then ! values for velocity calculation (on v-grid)
@ -196,7 +196,7 @@ contains
endif
enddo
enddo
do l=1,evp_sub_steps
!
! calculate strain tensor for viscosities and forcing elastic eqn.
@ -302,6 +302,7 @@ contains
enddo
enddo
enddo
!
! make averages
!
@ -314,7 +315,6 @@ contains
endif
enddo
enddo
end subroutine ice_dynamics
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!

5
src/ice_sis/ice_model.F90

@ -27,6 +27,8 @@
! manages fluxes, diagnostics, and ice timesteps; sea ice dynamics and !
! thermodynamics are performed in ice_[dyn|thm].f90 - Mike Winton (Michael.Winton)!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
! IOW 1 !
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
module ice_model_mod
use mpp_mod, only: mpp_clock_begin, mpp_clock_end
@ -886,16 +888,19 @@ contains
Ice%albedo_nir_dir(:,:,1) = Ice%albedo(:,:,1)
Ice%albedo_vis_dif(:,:,1) = Ice%albedo(:,:,1)
Ice%albedo_nir_dif(:,:,1) = Ice%albedo(:,:,1)
Ice%coszen(:,:) = coszen(:,:,1)
elseif (do_sun_angle_for_alb) then
call diurnal_solar(geo_lat*rad, geo_lon*rad, Ice%time, cosz=cosz_alb, &
fracday=diurnal_factor, rrsun=rrsun_dt_ice, dt_time=Dt_ice) !diurnal_factor as dummy
call compute_ocean_albedo (Ice%mask, cosz_alb(:,:), Ice%albedo_vis_dir(:,:,1),&
Ice%albedo_vis_dif(:,:,1), Ice%albedo_nir_dir(:,:,1),&
Ice%albedo_nir_dif(:,:,1), latitude )
Ice%coszen(:,:) = cosz_alb(:,:)
else
call compute_ocean_albedo (Ice%mask, coszen(:,:,1), Ice%albedo_vis_dir(:,:,1),&
Ice%albedo_vis_dif(:,:,1), Ice%albedo_nir_dir(:,:,1),&
Ice%albedo_nir_dif(:,:,1), latitude )
Ice%coszen(:,:) = coszen(:,:,1)
endif
if (id_alb_vis_dir>0) sent = send_data(id_alb_vis_dir, all_avg(Ice%albedo_vis_dir,Ice%part_size(isc:iec,jsc:jec,:)), &

5
src/ice_sis/ice_type.F90

@ -219,6 +219,7 @@ public :: iceClocka,iceClockb,iceClockc
real, pointer, dimension(:,: ) :: flux_sw_vis_dif =>NULL()
real, pointer, dimension(:,: ) :: flux_sw_nir_dir =>NULL()
real, pointer, dimension(:,: ) :: flux_sw_nir_dif =>NULL()
real, pointer, dimension(:,: ) :: coszen =>NULL() ! cosine of solar zenith angle
real, pointer, dimension(:,: ) :: flux_lh =>NULL()
real, pointer, dimension(:,: ) :: lprec =>NULL()
real, pointer, dimension(:,: ) :: fprec =>NULL()
@ -451,6 +452,7 @@ public :: iceClocka,iceClockb,iceClockc
Ice % flux_sw_vis_dif (isc:iec, jsc:jec) , &
Ice % flux_sw_nir_dir (isc:iec, jsc:jec) , &
Ice % flux_sw_nir_dif (isc:iec, jsc:jec) , &
Ice % coszen