Carefully follow the matrix size after each vectorized operation, of particular caution is that matlab would perform add/subtract between 1-by-n and n-by-1 matrix by broadcasting the matrix to fit n-by-n size.
I tried to echo some message in the ~/.bashrc
file, and then found scp does not work.
In short, this is basically scp
command try to parse these chars.
The scp
command builds ssh connection first between the source and sink host, and ssh will execute source ~/.bashrc
before full setup shell.
Therefore, put messages in ~/.bash_profile
.
Updated 2021-06-27**
To transfer a python project from one platform to another, we need to consider the dependencies.
Using requirements.txt
can solve this problem.
Start a new conda enviroment:
conda create -n test_aeolus python=3.6
conda env list
conda activate test_aeolus
Try to run the project in this new environment, you will encontour many ModuleNotFoundError
.
This is a “ping-pang” game, and install required packages in the brand-new environment by pip
, until our package runs smooth. At this moment:
pip freeze > requirements.txt
cat requirements.txt
certifi==2020.12.5
cftime==1.4.1
netCDF4==1.5.6
numpy==1.19.5
pandas==1.1.5
python-dateutil==2.8.1
pytz==2021.1
scipy==1.5.4
six==1.15.0
wrapt==1.12.1
wrf-python==1.3.1
xarray==0.16.2
Test requirements.txt
:
conda deactivate
conda create -n test_install python=3.6
conda activate test_install
pip install -r requirements.txt
python run.py
After testing, you may want to delete the test environment
conda remove -n test_install --all
https://blog.usejournal.com/why-and-how-to-make-a-requirements-txt-f329c685181e
Updated 2021-02-20**