Sunday 15 February 2015

mflab -- malab read excel using xlsread slow down problem

1. it is the second time i found matlab is doing dodgy things.
Specifically, It is found that mflab in some machines are extremetly slow. the main slow down script
turns out,
line 88 h=feval(['COM.' convertedProgID], 'server', machinename, interface);
at 
C:\Program Files\MATLAB\R2012b\toolbox\matlab\winfun\actxserver.m
or
C:\Program Files\MATLAB\R2014a\toolbox\matlab\winfun\actxserver.m

is the problematic file. just change it into

line 88 h=feval([convertedProgID], 'server', machinename, interface);
solves the slow down problem

2. aera object not working.
2015-02-16 change fdm3.m file into the old one will make area object working

1. et doesn't work, no matter how many time i have checked the input.
solution. reboot matlab, and use mflab in southern folder.
10/03/15

rect_2 is designed to make very small et and start from low, now i am trying to make et very low at the beginning.
apparently the flow one does not work at all!!!



There is a tricky part for the volumetric flow given by budget, particularly at the cell where water table locates. the front or right side flux is not calculated by volumetric flow on cross section area of the cell, but volumetric flow on wetting area of the CELL!!!




Comment 1:  if there is only one layer of cell, the first layer SHOULD be set as unconfied rather than varying cells. so that the result is correct. a experience from changing one layer from  modflow_no_leak
and modflow_rect_dd_1



Comment 2: if the time-variant specified head is not working properly, particularly the cells above the time variant hydraulic head is not wetted again, one should always make sure the cell abve the manipulated cell wet. This can be done either by moving the manipulated cell downward, or change the bottom hydraulic head that is manipulating.


example study:

mf2005\TerwisschaPE     lots of stress periods. theis equation is considered
mf2005\DutchTop\RainLens very good chd package, but the simulation is not working. needs to find out the way to get it running. perhaps git back to the previous versions.


an further analyze has indicated that mf2005 is performing better than mf2000 in terms of handling wetting and drying functions. specifically when WETDRY is positive, meaning cells from all directions can make the dry cell rewetted, mf2005 is able to deliver nice results while mf2000 can not get converged.



 *** ERROR OPENING FILE "Q2.HDS" ON UNIT    51
       SPECIFIED FILE STATUS: UNKNOWN
       SPECIFIED FILE FORMAT: BINARY
       SPECIFIED FILE ACCESS: SEQUENTIAL
       SPECIFIED FILE ACTION: READWRITE
  -- STOP EXECUTION (SGWF2BAS7OPEN)

solution:
1. download modflow for unix (
2. in openspec.inc, comment  DATA FORM/'BINARY'/ and uncomment   DATA FORM/'UNFORMATTED'/.
3. make the binary file




mf2kgmg.h: In function ‘MF2KGMG_BIGH’:
mf2kgmg.h:448:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
pcgn2.f90:26.6:
  USE PCG_MAIN
      1
Fatal Error: Can't open module file 'pcg_main.mod' for reading at (1): No such file or directory
utl7.f:234.14:
         IF ( LVAL.EQ. .FALSE. ) THEN                                
              1
Error: Logicals at (1) must be compared with .eqv. instead of .eq.
utl7.f:263.14:
         IF ( LVAL.EQ. .FALSE. ) THEN                                
              1
Error: Logicals at (1) must be compared with .eqv. instead of .eq.


(1) improve quiver object
$ grep -r -i --include *.m quiver ~/Projects/mflab/trunk/examples/
/home/chenming/Projects/mflab/trunk/examples/Analytic/GGOR/Analytic04.m:if isphi==0 % if averag seepage from second aquiver is given
/home/chenming/Projects/mflab/trunk/examples/mf2k/Qanats/TafiletMdl/mfiles/mf_analyze.m:%gr.quiver(B,1,'k','power',0.5);
/home/chenming/Projects/mflab/trunk/examples/mf2k/Qanats/TafiletMdl/SCENARIOS/mf_analyze.m:%gr.quiver(B,1,'k','power',0.5);

samba share

For file linux file system applying on windows, it is always the best to use samba share.
The confiuration file is given as follows:

1.  uncommet the follow line in /etc/samba/smb.conf

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each 
# user's home director as \\server\username
[homes]
   comment = Home Directories
   browseable = no

2. creater new users by

#smbpasswd -a chenming

3. restart samba process by:

#systemctl restart smbd
#systemctl restart nmbd
4. test the connections by: 
#smbclient -L localhost

once there is an error
ae429-1105 chenming # smbclient -L 10.33.20.12X
Enter root's password: 
Connection to 10.33.20.120 failed (Error NT_STATUS_CONNECTION_REFUSED)
the problem is solved by restart samba 



5. now it is time to mouprint(gcf,'-dpng',sprintf('-r%d',r), 'bar.png');nt the samba share by right click My computer -> map networkdrive->\\10.33.20.120\chenming and then password