NCAR / DART

Data Assimilation Research Testbed
https://dart.ucar.edu/
Apache License 2.0
196 stars 145 forks source link

radically different way to preprocess the source code #82

Closed hkershaw-brown closed 3 years ago

hkershaw-brown commented 3 years ago

Pull request from Nancy here https://github.com/NCAR/DART_development/pull/117

To do:

hkershaw-brown commented 3 years ago

I pushed the preprocess branch to NCAR/DART.
The preprocess branch needs updating to the master branch.

hkershaw-brown commented 3 years ago

Documentation:

hkershaw-brown commented 3 years ago

New files in cam-fv: bisection_subr.f90 high_top_table.f90 low_top_table.f90

what are these? Are they part of the preprocess update? (no?). Are they part of the new cam module?

hkershaw-brown commented 3 years ago

91 identical path_names_preprocess files

timhoar commented 3 years ago

The cam-fv files should be deleted (AGAIN ... the 4th time?) Why they keep reappearing is beyond me and, quite frankly, makes me angry!

git log --all --full-history -- "bisection_subr.f90"

hkershaw-brown commented 3 years ago

I'll go ahead and destroy these revenants.

hkershaw-brown commented 3 years ago

Compiling FESOM (ocean model), using

             obs_type_files = '../../../observations/forward_operators/obs_def_ocean_mod.f90'
             quantity_files = '../../../assimilation_code/modules/observations/ocean_quantities.f90'

QTY_VERTICAL_VELOCITY is in atmosphere_quantities.f90 why not have all the quantities available to each model? Are the units in the quantity file:

../../../models/FESOM/model_mod.f90:62:55:
   62 |                                  get_name_for_quantity,      &
      |                                                       1
Error: Symbol 'qty_vertical_velocity' referenced at (1) not found in module 'obs_kind_mod'

../../../models/FESOM/model_mod.f90:67:46:
   67 |                                  QTY_DRY_LAND,               &
      |                                              1
Error: Symbol 'qty_edge_normal_speed' referenced at (1) not found in module 'obs_kind_mod'
../../../models/FESOM/model_mod.f90:72:58:
   72 |                                  QTY_SEA_SURFACE_PRESSURE,   &
      |                                                          1
Error: Symbol 'qty_tracer_concentration' referenced at (1) not found in module 'obs_kind_mod'
nancycollins commented 3 years ago

there was no consensus on how to divide up the quantities into files, but my proposal was to try to group them into rough areas of modeling - e.g. atmospheric models, ocean models, land models, etc. quantities can be replicated, as long as they are exact matches, in multiple files. my goal was to have someone with a new model, or a model that was going to handle new quantities, to have a small-ish list of pre-existing quantities that they could easily scan through and reuse an existing quantity instead of inventing a new name for an existing idea.

your second question about vertical velocity is a good one. the ocean has u and v currents instead of wind. perhaps the atmosphere models should have vertical X velocity (atmosphere?) and the ocean models should have vertical_current_velocity to be more clear?

hkershaw-brown commented 3 years ago

It looks like there has been some cross pollination from mpas_atm to mpas_ocn and FESOM QTY_VERTICAL_VELOCITY, QTY_EDGE_NORMAL_SPEED are in the use obs_kinds for the ocean model mods, but these quantities are not actually used in the code.

hkershaw-brown commented 3 years ago

To check: parse_arg_mods.f90 is different in the preprocess branch vs. master (and Manhattan). Which is the correct version?

hkershaw-brown commented 3 years ago
  1. Preprocess keywords KIND -> QUANTITY in code but not filenames: https://github.com/hkershaw-brown/DART/tree/rad-preprocess

    • existing input.nml would need to be changed:
      input_obs_def_mod_file = '../../../observations/forward_operators/DEFAULT_obs_def_mod.F90',
      output_obs_def_mod_file = '../../../observations/forward_operators/obs_def_mod.f90',
      input_obs_qty_mod_file = '../../../assimilation_code/modules/observations/DEFAULT_obs_kind_mod.F90',
      output_obs_kind_mod_file = '../../../assimilation_code/modules/observations/obs_kind_mod.f90',
          obs_type_files = '../../../obs_def/obs_def_carrot_mod.f90',
          quantity_files = '../../../obs_def/vegetable_quantities.f90',
  2. New preprocess, but deafult to having all the quantity files, preprocess keywords unchanged: https://github.com/hkershaw-brown/DART/tree/basic-preprocess

  3. pair value version (the correct preprocess version). https://github.com/hkershaw-brown/DART/tree/preprocess_back_comp

hkershaw-brown commented 3 years ago

Note to check the ocean temp. (changed to K)