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**
In this fully coupled experiment, we expand the Australian landmass to connect the African continent to mimic the similar land-sea distribution in the Northern Hemisphere. The following is a demonstration of the modification.
Fig.1 Modified Land/Sea Mask Runtime Demo (Surf Temp in 0001-07)
We expand the land westward based on the natural eastern coastline of Australia (northeast corner: Cape York, and southeast corner: Tasmania), and naturally merged the African continent. For the newly emerged landmass, Plant Functional Types (PFT) are entirely set to bare soil, with the model default clay/sand/silt ratio. Soil color is set to code 20, which is in accordance with the western Australia. The terrain height is 10 m to avoid sea level change issues. We compiled the CAM3.5 physics package to accelerate the model spin-up. With 10 nodes (240 processors) layout on TH-2, CAM3.5 physics gains ~20% speed-up than CAM4 physics (27 sim.y/day vs 22 sim.y/day).
You may check the following links about the land surface properties: GLDAS Soil Land Surface
Also, Please see the previous post about modifications of PFTs and soils in the CLM.
Below we archive the procedures to achieve the goal.
We first decide how much we expand the landmass. After that, it would be convenient to use the modified land/sea mask file as a reference to generate other files.
All CESM land/sea mask info comes from ocean data. Here we start from the gx1v6_090205.nc
.
If you are not familiar with this, please refer the previous post.
Use python tool to convert land/sea mask to binary map (0-1 bmp) file.
Use your GUI tool (even paint app on windows) to edit the land/sea mask to fit your need.
Use python tool to convert bmp back to imask ncfile.
Fig.2 Modified Land/Sea Mask Bitmap (note the ocean grid system gives some deformation look)
Based on the modified land/sea mask file, we then adjust the corresponding ocean files.
Use this script to change bathymetry. Note the “big-enddian/little endian” shift is much easier in python.
Check the bathymetry is correctly modified. Here we maintained the original bathymetry to minimize the change in the real ocean (hop the integration is smooth).
Fig.3 Modified Ocean Bathymetry (shadings denote active grids in one ocean column)
Follow the previous post to generate SCRIP mapping files and domain files for other components.
Using the generated domain files, here we modify the topography file for the atmosphere.
LANDFRAC
and PHIS
(terrain height) in topography file according to the domain.lnd
file generated in III. (LANDFRAC is ignored by CAM4 and CAM5; fractional land is defined by the coupler mapping files.)Use this script to modify the land surface data sets, including PFT, soil color, etc.
Follow the previous post to setup your namelist files.
We can successfully integrate the model after above settings. The question is, we found runtime error from atm model
COLDSST: encountered in cldfrc: 241 6 0.161392688007392
This error comes from cloud_fraction.F90
, and it complains about low SSTs. We then found there is a strenge error from cpl to the atm that the grid cell with certain fraction of ocean surface, feels SST=0K.
This should not have happened as scrip mapping should have handle it well. We recheced all files with proper configurations and finally used some tricks to get SST from adjacent cell and rewrite the wrongly set SST in the fractional cell.
500 hPa HGT
TOA Radiative Budget
TOA Radiative Budget Time series
Surface Temperature