Ejemplo n.º 1
0
 def set_bcs(self):
     if self.left=='open':
         left=hm.StageBC(geom=np.array([[0,0],[0,20]]),
                         name='left',
                         water_level=0.0)
         left_salt=hm.ScalarBC(parent=left,scalar='salinity',value=10)
         self.add_bcs([left,left_salt])
     if self.right=='open':
         right=hm.StageBC(geom=np.array([[100,0],[100,20]]),
                          name='right',
                          water_level=-0.01)
         right_salt=hm.ScalarBC(parent=right,scalar='salinity',value=15)
         self.add_bcs([right,right_salt])
Ejemplo n.º 2
0
 def set_bcs(self):
     t_mid=self.run_stop-np.timedelta64(1,'D')
     
     z_da=xr.DataArray([6,-1,-1],
                       dims=('time',),
                       coords=dict(time=[self.run_start,t_mid,self.run_stop]))
     self.add_bcs(hm.StageBC(name='ocean_bc',water_level=z_da))
Ejemplo n.º 3
0
 def set_mouth_stage_qcm(self):
     """
     Use the interpolated QCM waterlevel datas as BC.
     Stock QCM output is a bit coarse (dt=1h) for stage, so 
     smooth it at shorter time step
     """
     ocean_bc = hm.StageBC(name='ocean_bc', water_level=0.0)
     self.add_bcs([ocean_bc])
     return ocean_bc
Ejemplo n.º 4
0
 def set_mouth_stage_qcm(self):
     """
     Use the interpolated QCM waterlevel datas as BC.
     Stock QCM output is a bit coarse (dt=1h) for stage, so 
     smooth it at shorter time step.
     Include SLR offset
     """
     da=self.prep_qcm_waterlevel_resampled() 
     ocean_bc=hm.StageBC(name='ocean_bc',water_level=da)
     self.add_bcs([ocean_bc])
     return ocean_bc
Ejemplo n.º 5
0
    def set_bcs(self):
        left=hm.StageBC(geom=np.array([[0,0],[0,20]]),
                        name='left',
                        water_level=0.0)
        left_salt=hm.ScalarBC(parent=left,scalar='salinity',value=20)
        
        sink=hm.SourceSinkBC(name='sink',
                             geom=np.array([95,8,2.0]),
                             flow=self.Q_sink)

        self.add_bcs([left,left_salt,sink])