# How to use ORCHIDEE with libIGCM? (2023/02/20)(Yi-Ying Chen, RCEC) [How to use ORCHIDEE in off-line mode with IPSL LibIGCM (2023/02/13)(Yi-Ying Chen, RCEC)](https://hackmd.io/@yylabchen/ORCHIDEE0213) ## Create a new task by Steps ### Step1: create a folder Create a folder under the path: /config/ORCHIDEE_OL 可用 ```bash cp /home/u9197633/MODEL_IPSL/ORC_4262_copy/config/ORCHIDEE_OL/TEST_RUN_TW_PFT /home/u2936446/MODEL_IPSL/ORC_4262/config/ORCHIDEE_OL/TEST_RUN_TW_PFT -r ``` ### Step2: vim config.card ![](https://photos.smugmug.com/photos/i-CCK94hs/0/32fce236/O/i-CCK94hs.jpg) - set up JobName - check CalendarType - set up DateBegin and DateEnd - check PeriodLength - set up the output file path(自己主機名稱) --- ![](https://photos.smugmug.com/photos/i-HDKJ5Wd/0/453b22dc/O/i-HDKJ5Wd.jpg) - check MPI number(CPU) --- ![](https://photos.smugmug.com/photos/i-wqTgW37/1/f8e4d54b/O/i-wqTgW37.jpg) - set up Restarts - set up WriteFrequency ### Step3 : Modify the path of Boundary Files - Set up boundary file paths in COMP folder - We need edit orchidee_ol.card, sechiba.card, and stomate.card ### Step4: Edit the bash script, clean.‌sh ([ref](https://stackoverflow.com/questions/58818272/how-to-remove-link-in-md-file)) ![](https://photos.smugmug.com/photos/i-8HTLZBZ/0/72535909/O/i-8HTLZBZ.jpg) ### Step5: Submit the ORCHIDEE job with libIGCM - Enter ./clean.sh to create the Job_JobName file as follow as: ![](https://photos.smugmug.com/photos/i-ngRxqRW/0/cef5459e/L/i-ngRxqRW-L.jpg) - `sbatch {Job_Name}` ### Step6: Check run.card ![](https://photos.smugmug.com/photos/i-PTqKtsP/0/516e275e/L/i-PTqKtsP-L.jpg) - All of the information are in the “run.card” file, so we usually type `cat run.card` to check the job state. ## Set up output variables ### Choose the variable levels in a new tasks ![](https://photos.smugmug.com/photos/i-SqtzkdX/0/b20921d0/O/i-SqtzkdX.jpg) - To find the run.def in a new task. - Path: {New Task Folder}/ PARAM/ run.def ### Set up levels of variables ![](https://photos.smugmug.com/photos/i-WjpG8RV/0/d6818b43/L/i-WjpG8RV-L.jpg) ## Assign CPU resources ### Edit AA_job file - Path: /ORC_4262/libIGCM/AA_job ``` #SBATCH --job_name=::Jobname:: (a dynamic variable for job name) #SBATCH --ntasks = ::JobNumProcTot:: (a dynamic variable for number of cores, CPU) #SBATCH –account=MST111248 (project name for accounting CPU resources) #SBATCH -p ct56 (queue_name depend on the available queue in the system ) #SBATCH -o output script for your job ``` `qstat`可看CPU狀態 ## ferret layout ``` ferret use pic1 set view left shade height[K=2, L=1] use pic2 set view right shade height[K=2, L=1] frame /files=test2.gif q ``` ![](https://photos.smugmug.com/photos/i-nVzzwQ9/0/f31dd62e/O/i-nVzzwQ9.jpg)