Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POP configure script should separate marbl_cppdefs from cppdefs #113

Closed
mnlevy1981 opened this issue Nov 30, 2016 · 1 comment
Closed

POP configure script should separate marbl_cppdefs from cppdefs #113

mnlevy1981 opened this issue Nov 30, 2016 · 1 comment

Comments

@mnlevy1981
Copy link
Collaborator

It will be useful to separate which variables in POP's configure script are needed by POP vs which will be moving to MARBL when MARBL's build system matures.

A good starting point would be something like

Index: configure
===================================================================
--- configure	(revision 81820)
+++ configure	(working copy)
@@ -223,6 +223,8 @@
 
 sub set_cppdefs {
 
+  my $marbl_cppdefs = "";
+
   $cppdefs = "$cppdefs -DBLCKX=$POP_BLCKX";
   $cppdefs = "$cppdefs -DBLCKY=$POP_BLCKY";
   $cppdefs = "$cppdefs -DMXBLCKS=$POP_MXBLCKS";
@@ -230,12 +232,15 @@
   if ("$OCN_GRID" =~ /tx0.1*/ ) {$cppdefs = "$cppdefs -D_HIRES";}
   if ("$OCN_ICE_FORCING" eq 'inactive' ) {$cppdefs = "$cppdefs -DZERO_SEA_ICE_REF_SAL";}
   if ("$POP_TAVG_R8" eq 'TRUE'         ) {$cppdefs = "$cppdefs -DTAVG_R8";}
-  $cppdefs = "$cppdefs -DECOSYS_NT=$ECOSYS_NT";
   $cppdefs = "$cppdefs -DMARBL_NT=$MARBL_NT";
-  $cppdefs = "$cppdefs -DZOOPLANKTON_CNT=$ZOOPLANKTON_CNT";
-  $cppdefs = "$cppdefs -DAUTOTROPH_CNT=$AUTOTROPH_CNT";
-  $cppdefs = "$cppdefs -DGRAZER_PREY_CNT=$GRAZER_PREY_CNT";
   $cppdefs = "$cppdefs -DIRF_NT=$IRF_NT";
+
+  $marbl_cppdefs = "$marbl_cppdefs -DECOSYS_NT=$ECOSYS_NT";
+  $marbl_cppdefs = "$marbl_cppdefs -DZOOPLANKTON_CNT=$ZOOPLANKTON_CNT";
+  $marbl_cppdefs = "$marbl_cppdefs -DAUTOTROPH_CNT=$AUTOTROPH_CNT";
+  $marbl_cppdefs = "$marbl_cppdefs -DGRAZER_PREY_CNT=$GRAZER_PREY_CNT";
+
+  $cppdefs = "$cppdefs $marbl_cppdefs";
     
   # write out cppdefs to env_build.xml
   # this will determine if need to rebuild at runtime - force user to call $CASE.buildexe

maybe adding marbl_ to the local variables that are MARBL specific as well. Also, we can compute ECOSYS_NT and CISO_NT from the PFT counts...

  # Compute tracer counts!
  # Each zooplankton class adds:
  # -- one new tracer (C) to the base tracer module
  # -- As of now, zoo13C and zoo14C are hardcoded in the ciso tracer module
  # Each autotroph class adds:
  # -- three new tracers (Chl, C, Fe) to the base tracer module
  # -- two new tracers (C13, C14) to the ciso tracer module
  # Each autotroph class that is a silicifier also adds:
  # -- an additional tracer (Si) to the base tracer module
  # Each autotroph class that is a calcifier also adds:
  # -- an additional tracer (CaCO3) to the base tracer module
  # -- two new tracers (Ca13CO3, Ca14CO3) to the ciso tracer module
  $ECOSYS_NT       = 15 + $ZOOPLANKTON_CNT + 3*$AUTOTROPH_CNT + $SILICIFIER_CNT + $CALCIFIER_CNT;
  $CISO_NT         = 6 + 2*$AUTOTROPH_CNT + 2*$CALCIFIER_CNT;
@mnlevy1981 mnlevy1981 self-assigned this Nov 30, 2016
@mnlevy1981 mnlevy1981 modified the milestone: GCM-specifc bugs Jan 24, 2017
@mnlevy1981
Copy link
Collaborator Author

Closing this as MARBL no longer has any cppdefs (everything is runtime configurable as of #189)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant