bearecinos / smith_glacier

Experiments with Fenics_ice over Smith, Pope, and Kohler Glaciers; three narrow ∼ 10 km wide, interconnected West Antarctic ice streams (Note: this repository documentation is still a work in progress).
1 stars 0 forks source link

Dan update b bar calculation #5

Closed dngoldberg closed 2 years ago

dngoldberg commented 2 years ago

i have updated b_bar_calculation.py. previously, the calculation depended on a previously generated file which could not be reproduced. this process duplicated the georeferencing of the previous file, and relied heavily on it for interpolation of bglen. There was not a need for this. The purposes of the bglen file are:

  1. provide a "prior" for areas of the domain that
  1. provide an initial guess of beta for the whole domain.

The initial guess can (and should be) equivalent to the prior within the coverage of the pattyn product; and it is continuously varying over the whole domain. Note that for (2), the gridded initial guess can extend past the domain, values outside the domain will be ignored.

The script finds a rectangle enclosing the domain by using the same bounding box as that used elsewhere in the prepro scripts, and then adds a conservative "buffer" to this box. It generates 2 fields -- (1) a mask which is equal to 1 where the pattyn file has coverage, and 0 elsewhere; and (2) a continuously varying initial guess field, which is equivalent to the prior where the mask is 1. Both fields are now within a single hdf5 file. These fields are used by PR #24

bearecinos commented 2 years ago

Oh no I just realized we might not be able to merge this as this requires PR24 to be in fenics_ice ... I will leave this for the meeting because can be confusing ...

dngoldberg commented 2 years ago

sorry! i do need to come back to this, but just been doing other stuff this week.. and need to give my lecture at 2..

bearecinos commented 2 years ago

yes no worries I just think we can't merge this yet ... until we are sure the fenics_ice code can handle this changes ... we should talk about this tomorrow ... I am running everything else now with Joe's file

dngoldberg commented 2 years ago

ok that is fine.

though this brings up a question, if we change a data file from the repo that you clone as a part of the test, does this require a PR? this is something which maybe we should talk about too.

bearecinos commented 2 years ago

yes that it's easy you just make a PR to the fenics_ice_test_data repo... and make the changes in the smith glacier test (update J_inv in the toml, etc)