Changeset 8377 for branches/ORCHIDEE_2_2
- Timestamp:
- 2024-01-14T15:15:57+01:00 (11 months ago)
- Location:
- branches/ORCHIDEE_2_2/ORCHIDEE
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_JEANZAY.path
r6211 r8377 11 11 XIOS_LIB="-lxios" 12 12 13 OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib" 14 OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib" 15 OASIS_LIB="" -
branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_MESOIPSL.path
r7759 r8377 10 10 XIOS_LIBDIR="-L${ORCHDIR}/../XIOS/lib" 11 11 XIOS_LIB="-lxios" 12 13 OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib" 14 OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib" 15 OASIS_LIB="" -
branches/ORCHIDEE_2_2/ORCHIDEE/makeorchidee_fcm
r7474 r8377 42 42 43 43 is_driver_opt=FALSE 44 is_oasisdriver_opt=FALSE 44 45 is_other_opt=FALSE 45 46 clean=FALSE … … 62 63 config_path=$ORCHDIR/${rel_config_path} 63 64 64 65 65 # Following variables can be set as environement variables if wanted 66 66 if [ -n "$FCM_ARCH" ]; then … … 98 98 "-driver") 99 99 is_driver_opt=TRUE ; shift ;; 100 101 "-oasisdriver") 102 is_oasisdriver_opt=TRUE ; shift ;; 100 103 101 104 "-otherexec") … … 177 180 # Usage of the script makeorchidee_fcm 178 181 # 179 # makeorchidee_fcm compiles ORCHIDEE using the Fcm asoftware developed182 # makeorchidee_fcm compiles ORCHIDEE using the Fcm software developed 180 183 # by the Hadley Centre. Fcm is stored in tools directory. 181 184 # Platform specific compile options are found in the arch directory. … … 187 190 [ -h ] : show this help 188 191 189 [ -arch XXX ] : name of the archicture file containg platform dependent compile options. 190 The files arch/arch-XXX.fcm and arch/arch-XXX.path must exist. 192 [ -arch XXX ] : name of the architecture file containing platform dependent compile options. 193 The files arch/arch-XXX.fcm and arch/arch-XXX.path must exist. If the 194 file arch/arch-XXX.env exist, it'll be sourced before compilation starts. 191 195 192 196 [ -arch_path XXX ] : directory of the archicture file containg platform dependent compile options. 193 Default is ./arch directory. If the files are not found in the folder, the default ./arch folder will be used. 197 Default is ./arch directory. If the files are not found in the folder given by arch_path, 198 the default ./arch folder will be used. 194 199 195 200 [ -parallel|-p PARALLEL_TYPE ] : choose parallelization mode for ORCHIDEE : … … 201 206 202 207 [ -driver ] : compilation of ORCHIDEE offline standard driver 203 [ -otherexec ] : compilation of other programs: teststomate,forcesoil, testrouting.208 [ -otherexec ] : compilation of other programs: forcesoil, testrouting. 204 209 Warning! All these programs are not fully validated or maintained. 205 210 206 211 Options related to cleaning 207 | -clean ] : delete all files produce ed during previous compilation212 | -clean ] : delete all files produced during previous compilation 208 213 | -full ] : activate full recompiling 209 214 … … 215 220 [ -prod ] : compilation for production (all optimization) 216 221 [ -dev ] : compilation for development (low optimization and -g) 217 [ -debug ] : compilation for debugging (no opt mization and all debug options)222 [ -debug ] : compilation for debugging (no optimization and all debug options) 218 223 219 224 Option to optimize the compilation time … … 223 228 [ -ext_src path] : path to an additional directory with fortran routines to compile with the model 224 229 225 Options for compiling the documentation :230 Options for compiling the Doxygen documentation 226 231 [ -doc ] : generate documentation with Doxygen (exit after doc computation) 227 232 [ -doc_para ] : generate documentation with Doxygen with parallelization calls … … 457 462 fi 458 463 459 # Determine if also need to compile the OASIS driver. This is only the case if the 460 # path for the libraries is provided and exists 461 if [ -n "$OASIS_LIBDIR" ] ; then 462 is_oasisdriver_opt=TRUE 463 # Check also if the provided path also exist. If not, delete the option. 464 if [ ! -d ${OASIS_LIBDIR} ]; then 465 is_oasisdriver_opt=FALSE 464 # Check that OASIS has been installed for option to compile the oasis driver in ORCHIDEE 465 if [[ "${is_oasisdriver_opt}" == "TRUE" ]] ; then 466 if [ "X"${OASIS_LIBDIR} != "X" ] ; then 467 # Check also if the provided path also exist. If not, delete the option. 468 testdir=$(echo ${OASIS_LIBDIR} | sed -e"s/\-L//") 469 if [ ! -d ${testdir} ]; then 470 echo "OASIS is not existing on the path : $OASIS_LIBDIR" 471 echo "OASIS needs to be installed before compiling the orchideeoasisdriver. Exit now" 472 exit 473 fi 474 else 475 echo "OASIS must be compiled before compiling the oasis driver in ORCHIDEE" 476 echo "OASIS_LIBDIR and OASIS_INCDIR must be set in the arch.path file." 477 echo "Exit now." 478 exit 466 479 fi 467 else 468 is_oasisdriver_opt=FALSE 469 fi 480 fi 481 470 482 471 483 # set target … … 475 487 fi 476 488 if [[ "$is_other_opt" == "TRUE" ]] ; then 477 TARGET="${TARGET} teststomate.exe forcesoil.exe testrouting.exe" 478 fi 489 TARGET="${TARGET} forcesoil.exe testrouting.exe" 490 fi 491 492 echo "XXXXXX $is_oasisdriver_opt" 479 493 480 494 if [[ "$is_oasisdriver_opt" == "TRUE" ]] ; then … … 485 499 echo "OASIS : ${INCDIR}" 486 500 fi 487 488 501 489 502 # build config file … … 549 562 # Move created executables to modipsl/bin directory 550 563 if [ -f ${config_path}/bin/dim2_driver.exe ] ; then cp -f ${config_path}/bin/dim2_driver.exe ../../bin/orchidee_ol ; fi 551 if [ -f ${config_path}/bin/teststomate.exe ] ; then cp -f ${config_path}/bin/teststomate.exe ../../bin/teststomate ; fi552 564 if [ -f ${config_path}/bin/forcesoil.exe ] ; then cp -f ${config_path}/bin/forcesoil.exe ../../bin/forcesoil ; fi 553 565 if [ -f ${config_path}/bin/orchideedriver.exe ] ; then cp -f ${config_path}/bin/orchideedriver.exe ../../bin/orchideedriver ; fi -
branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/orchideedriver.f90
r7796 r8377 585 585 CALL xios_orchidee_init( MPI_COMM_ORCH, & 586 586 date0, year_end, month_end, day_end, julian_diff, & 587 lon, lat 587 lon, lat, corners_lon, corners_lat) 588 588 CALL sechiba_xios_initialize 589 589 -
branches/ORCHIDEE_2_2/ORCHIDEE/src_oasisdriver/orchideeoasis.f90
r7265 r8377 22 22 !! 23 23 !! SVN : 24 !! $HeadURL: $25 !! $Date: $26 !! $Revision: $24 !! $HeadURL: svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE/src_oasisdriver/orchideeoasis.f90 $ 25 !! $Date: 2023-08-17 23:22:02 +0200 (Thu, 17 Aug 2023) $ 26 !! $Revision: 8140 $ 27 27 !! \n 28 28 !_ ================================================================================================================================ … … 35 35 USE netcdf 36 36 ! 37 USE xios 37 38 ! 38 39 USE ioipsl_para … … 40 41 ! 41 42 USE grid 43 USE time 42 44 USE timer 43 45 USE constantes 46 USE constantes_soil 44 47 USE globgrd 45 48 USE orchoasis_tools … … 48 51 USE control 49 52 USE ioipslctrl 53 USE xios_orchidee 50 54 ! 51 55 USE mod_oasis … … 65 69 REAL(r_std), ALLOCATABLE, DIMENSION(:,:,:,:) :: corners_glo 66 70 REAL(r_std), ALLOCATABLE, DIMENSION(:,:,:) :: corners_lon, corners_lat 71 REAL(r_std), ALLOCATABLE, DIMENSION(:,:,:) :: corners_lon_tmp, corners_lat_tmp 67 72 INTEGER(i_std) :: nbindex_g, kjpindex 68 73 INTEGER(i_std), ALLOCATABLE, DIMENSION(:) :: kindex, kindex_g … … 78 83 !- 79 84 INTEGER(i_std) :: i, j, ik, nbdt, first_point 85 INTEGER :: ierr 80 86 INTEGER(i_std) :: itau, itau_offset, itau_sechiba 81 REAL(r_std) :: date0, date0_shifted, dt, julian , julian087 REAL(r_std) :: date0, date0_shifted, dt, julian 82 88 INTEGER(i_std) :: rest_id, rest_id_stom 83 89 INTEGER(i_std) :: hist_id, hist2_id, hist_id_stom, hist_id_stom_IPCC 84 90 REAL(r_std), ALLOCATABLE, DIMENSION(:,:) :: lalo_loc 85 INTEGER(i_std) :: iim, jjm 91 INTEGER(i_std) :: iim, jjm, in, jk 86 92 REAL(r_std), ALLOCATABLE, DIMENSION(:,:) :: lon, lat 87 93 !- … … 110 116 !- output fields 111 117 !- 112 REAL(r_std), ALLOCATABLE, DIMENSION (:) :: z0 !! Surface roughness 118 REAL(r_std), ALLOCATABLE, DIMENSION (:) :: z0m !! Surface momentum roughness 119 REAL(r_std), ALLOCATABLE, DIMENSION (:) :: z0h !! Surface scalar transport roughness 113 120 REAL(r_std), ALLOCATABLE, DIMENSION (:) :: coastalflow !! Diffuse flow of water into the ocean (m^3/dt) 114 121 REAL(r_std), ALLOCATABLE, DIMENSION (:) :: riverflow !! Largest rivers flowing into the ocean (m^3/dt) … … 128 135 REAL(r_std), ALLOCATABLE, DIMENSION (:,:) :: lai !! Leaf area index (m^2 m^{-2} 129 136 REAL(r_std), ALLOCATABLE, DIMENSION (:,:) :: height !! Vegetation Height (m) 137 REAL(r_std), ALLOCATABLE, DIMENSION (:) :: run_off_lic !! Calving, melting and liquid precipitation, needed when coupled to atmosphere 138 REAL(r_std), ALLOCATABLE, DIMENSION (:) :: run_off_lic_frac !! Cell fraction corresponding to run_off_lic 139 130 140 !- 131 141 !- Declarations for OASIS … … 178 188 ! Set parallel processing in ORCHIDEE 179 189 ! 180 CALL Init_orchidee_para(LOCAL_OASIS_COMM )190 CALL Init_orchidee_para(LOCAL_OASIS_COMM, .TRUE.) 181 191 !==================================================================================== 182 192 ! … … 275 285 !- 276 286 CALL orchoasis_time(date0, dt, nbdt) 287 CALL time_initialize(0, date0, dt, "END") 277 288 !- 278 289 !- lalo needs to be created before going into the parallel region … … 355 366 ! 356 367 ALLOCATE(lon(iim,jjm), lat(iim,jjm)) 368 ALLOCATE(corners_lon(nbseg,iim,jj_para_nb(mpi_rank)), corners_lat(nbseg,iim,jj_para_nb(mpi_rank))) 357 369 ALLOCATE(kindex(kjpindex)) 358 370 ! 359 371 lon=lon_glo(:,jj_para_begin(mpi_rank):jj_para_end(mpi_rank)) 360 372 lat=lat_glo(:,jj_para_begin(mpi_rank):jj_para_end(mpi_rank)) 373 DO in=1,nbseg 374 DO j=1,jj_para_nb(mpi_rank) 375 jk=jj_para_begin(mpi_rank)+(j-1) 376 DO i=1,iim 377 ! Copy the corners/bounds of the meshes which are local to this processor. 378 ! Serves for OASIS and XIOS. 379 corners_lon(in,i,j)=corners_glo(i,jk,in,1) 380 corners_lat(in,i,j)=corners_glo(i,jk,in,2) 381 ENDDO 382 ENDDO 383 ENDDO 361 384 ! 362 385 ! … … 407 430 ALLOCATE(carbwh(kjpindex), carbha(kjpindex)) 408 431 ALLOCATE(tsol_rad(kjpindex), temp_sol_new(kjpindex), qsurf(kjpindex)) 409 ALLOCATE(albedo(kjpindex,2), emis(kjpindex), z0 (kjpindex))432 ALLOCATE(albedo(kjpindex,2), emis(kjpindex), z0m(kjpindex), z0h(kjpindex)) 410 433 ALLOCATE(veget(kjpindex,nvm)) 411 434 ALLOCATE(lai(kjpindex,nvm)) 412 435 ALLOCATE(height(kjpindex,nvm)) 436 ALLOCATE(run_off_lic(kjpindex)) 437 ALLOCATE(run_off_lic_frac(kjpindex)) 438 413 439 ! 414 440 WRITE(numout,*) "Rank", mpi_rank, "Domain size per proc !:", iim_glo, jjm_glo, kjpindex, SIZE(kindex) 415 441 WRITE(numout,*) "Rank", mpi_rank, "In parallel region land index starts at : ", kindex(1) 416 !417 CALL orchoasis_time(date0, dt, nbdt)418 !419 CALL control_initialize420 dt_sechiba = dt421 !422 itau = 0423 !424 CALL ioipslctrl_restini(itau, date0, dt, rest_id, rest_id_stom, itau_offset, date0_shifted)425 !426 ! Get the date of the first time step427 !428 julian = date0 + 0.5*(dt/one_day)429 CALL ju2ymds (julian, year, month, day, sec)430 !431 in_julian = itau2date(itau, date0, dt)432 CALL ymds2ju (year,1,1,zero, julian0)433 julian_diff = in_julian-julian0434 435 CALL xios_orchidee_init( MPI_COMM_ORCH, &436 date0, year, month, day, julian_diff, &437 lon, lat )438 !439 itau_sechiba = itau + itau_offset440 !441 WRITE(numout,*) "orchoasis_history :", iim, jjm, SHAPE(lon)442 !- Initialize IOIPSL sechiba output files443 CALL ioipslctrl_history(iim, jjm, lon, lat, kindex, kjpindex, itau_sechiba, &444 date0, dt, hist_id, hist2_id, hist_id_stom, hist_id_stom_IPCC)445 WRITE(numout,*) "HISTORY : Define for ", itau, date0, dt446 442 ! 447 443 !- … … 462 458 CALL oasis_write_grid(oasis_gridname, iim_glo, jjm_glo, lon_glo, lat_glo) 463 459 ! 464 ALLOCATE(corners_lon (iim_glo, jjm_glo, nbseg), corners_lat(iim_glo, jjm_glo, nbseg))465 corners_lon (:,:,:) = corners_glo(:,:,:,1)466 corners_lat (:,:,:) = corners_glo(:,:,:,2)467 CALL oasis_write_corner(oasis_gridname, iim_glo, jjm_glo, nbseg, corners_lon , corners_lat)460 ALLOCATE(corners_lon_tmp(iim_glo, jjm_glo, nbseg), corners_lat_tmp(iim_glo, jjm_glo, nbseg)) 461 corners_lon_tmp(:,:,:) = corners_glo(:,:,:,1) 462 corners_lat_tmp(:,:,:) = corners_glo(:,:,:,2) 463 CALL oasis_write_corner(oasis_gridname, iim_glo, jjm_glo, nbseg, corners_lon_tmp, corners_lat_tmp) 468 464 ! 469 465 ALLOCATE(maskinv_glo(iim_glo, jjm_glo)) … … 490 486 CALL oasis_write_grid(oasis_gridname, iim_glo, jjm_glo, lon_glo, lat_glo) 491 487 ! 492 CALL oasis_write_corner(oasis_gridname, iim_glo, jjm_glo, nbseg, corners_lon , corners_lat)488 CALL oasis_write_corner(oasis_gridname, iim_glo, jjm_glo, nbseg, corners_lon_tmp, corners_lat_tmp) 493 489 ! 494 490 CALL oasis_write_mask(oasis_gridname, iim_glo, jjm_glo, maskinv_glo) … … 498 494 CALL oasis_terminate_grids_writing() 499 495 ENDIF 500 DEALLOCATE(corners_lon , corners_lat)496 DEALLOCATE(corners_lon_tmp, corners_lat_tmp) 501 497 ! 502 498 ENDIF … … 512 508 CALL orchoasis_defvar(mpi_rank, kjpindex) 513 509 ! 510 !--------------------------------------------------------------------------------------- 511 !- 512 !- Initialize the restart process and XIOS. 513 !- 514 !--------------------------------------------------------------------------------------- 515 CALL control_initialize 516 dt_sechiba = dt 517 ! 518 itau = 0 519 ! 520 CALL ioipslctrl_restini(itau, date0, dt, rest_id, rest_id_stom, itau_offset, date0_shifted) 521 ! 522 ! Get the date of the first time step 523 ! 524 ! To ensure that itau starts with 0 at date0 for the restart, we have to set an off-set to achieve this. 525 ! itau_offset will get used to prduce itau_sechiba. 526 ! 527 itau_offset=-itau_offset-1 528 ! 529 ! Get the date of the first time step 530 ! 531 WRITE(numout,*) "itau_offset : itau_offset : ", itau_offset 532 WRITE(numout,*) "itau_offset : date0 ymd : ", year_end, month_end, day_end, sec_end 533 WRITE(numout,*) "itau_offset : date0, sec, dt : ", sec_end, dt 534 535 CALL xios_orchidee_init( MPI_COMM_ORCH, & 536 date0, year_end, month_end, day_end, julian_diff, & 537 lon, lat, corners_lon, corners_lat ) 538 ! 539 CALL sechiba_xios_initialize 540 ! 541 CALL xios_orchidee_close_definition 542 WRITE(numout,*) 'After xios_orchidee_close_definition' 543 ! 544 itau_sechiba = itau + itau_offset 545 ! 546 WRITE(numout,*) "orchoasis_history :", iim, jjm, SHAPE(lon) 547 !- Initialize IOIPSL sechiba output files 548 CALL ioipslctrl_history(iim, jjm, lon, lat, kindex, kjpindex, itau_sechiba, & 549 date0, dt, hist_id, hist2_id, hist_id_stom, hist_id_stom_IPCC) 550 WRITE(numout,*) "HISTORY : Define for ", itau, date0, dt 551 ! 514 552 !- 515 553 !--------------------------------------------------------------------------------------- … … 519 557 !--------------------------------------------------------------------------------------- 520 558 !- 559 !- Some default values so that the operations before the ORCHIDEE initialisation do not fail. 560 !- 561 z0m(:) = 0.1 562 albedo(:,:) = 0.13 563 !- 521 564 itau = 0 522 julian = date0 + (itau+0.5)*(dt/one_day)523 CALL ju2ymds (julian, year, month, day, sec)524 565 !- 525 566 !--------------------------------------------------------------------------------------- … … 532 573 DO itau=1,nbdt 533 574 ! 534 julian = date0 + (itau-0.5)*(dt/one_day) 535 ! Needed for STOMATE but should be taken from the arguments of SECHIBA 536 in_julian = itau2date(itau, date0, dt) 537 ! 538 CALL ju2ymds (julian, year, month, day, sec) 539 CALL ymds2ju (year,1,1,zero, julian0) 540 julian_diff = in_julian-julian0 575 CALL time_nextstep( itau ) 576 julian = (julian_start + julian_end) /2.0 !julian_end 541 577 ! 542 578 ! … … 581 617 peqAcoef(:) = zero 582 618 ! 583 CALL orchoasis_printpoint(julian, testpt(1), testpt(2), kjpindex, lalo_loc, z0 , &619 CALL orchoasis_printpoint(julian, testpt(1), testpt(2), kjpindex, lalo_loc, z0m, & 584 620 & "Z0 before compute", ktest) 585 621 ! 586 ! Interpolate the wind (which is at hight zlev_uv) to the same height587 ! as the temperature and humidity (at zlev_tq).588 !589 u_tq(:) = u(:)*LOG(zlev_tq(:)/z0(:))/LOG(zlev_uv(:)/z0(:))590 v_tq(:) = v(:)*LOG(zlev_tq(:)/z0(:))/LOG(zlev_uv(:)/z0(:))591 622 ! 592 623 CALL orchoasis_printpoint(julian, testpt(1), testpt(2), kjpindex, lalo_loc, u_tq, "USED East-ward wind") … … 613 644 CALL xios_orchidee_update_calendar(itau_sechiba) 614 645 ! 646 ! Use the obtained albedo to diagnose the Downward Solar and the wind at the right level 647 ! 648 swdown(:) = swnet(:)/(1.-(albedo(:,1)+albedo(:,2))/2.) 649 u_tq(:) = u(:)*LOG(zlev_tq(:)/z0m(:))/LOG(zlev_uv(:)/z0m(:)) 650 v_tq(:) = v(:)*LOG(zlev_tq(:)/z0m(:))/LOG(zlev_uv(:)/z0m(:)) 651 ! 615 652 IF ( itau == 1 ) THEN 616 653 ! … … 623 660 ! 624 661 CALL sechiba_initialize( & 625 itau_sechiba, iim*jjm, kjpindex, kindex, &662 itau_sechiba, iim*jjm, kjpindex, kindex, & 626 663 lalo_loc, contfrac, neighbours, resolution, zlev_tq, & 627 u_tq, v_tq, qair, temp_air, &628 petAcoef, peqAcoef, petBcoef, peqBcoef, &629 precip_rain, precip_snow, lwdown, swnet, swdown, &664 u_tq, v_tq, qair, temp_air, & 665 petAcoef, peqAcoef, petBcoef, peqBcoef, & 666 precip_rain, precip_snow, lwdown, swnet, swdown, & 630 667 pb, rest_id, hist_id, hist2_id, & 631 668 rest_id_stom, hist_id_stom, hist_id_stom_IPCC, & 632 coastalflow, riverflow, tsol_rad, vevapp, qsurf, &633 z0 , albedo, fluxsens, fluxlat, emis,&669 coastalflow, riverflow, tsol_rad, vevapp, qsurf, & 670 z0m, z0h, albedo, fluxsens, fluxlat, emis, & 634 671 temp_sol_new, cdrag) 635 672 CALL orchoasis_printpoint(julian, testpt(1), testpt(2), kjpindex, lalo_loc, temp_sol_new, "Init temp_sol_new") 636 !637 ! Use the obtained albedo to diagnose the Downward Solar638 !639 swdown(:) = swnet(:)/(1.-(albedo(:,1)+albedo(:,2))/2.)640 673 ! 641 674 lrestart_read = .FALSE. … … 674 707 & netco2, carblu, carbwh, carbha, & 675 708 ! Surface temperatures and surface properties 676 & tsol_rad, temp_sol_new, qsurf, albedo, emis, z0 , &709 & tsol_rad, temp_sol_new, qsurf, albedo, emis, z0m, z0h, & 677 710 ! Vegeation, lai and vegetation height 678 711 & veget, lai, height, & 679 712 ! File ids 680 713 & rest_id, hist_id, hist2_id, rest_id_stom, hist_id_stom, hist_id_stom_IPCC) 681 !682 ! Use the obtained albedo to diagnose the Downward Solar683 !684 swdown(:) = swnet(:)/(1.-(albedo(:,1)+albedo(:,2))/2.)714 !!$ ! 715 !!$ ! Use the obtained albedo to diagnose the Downward Solar 716 !!$ ! 717 !!$ swdown(:) = swnet(:)/(1.-(albedo(:,1)+albedo(:,2))/2.) 685 718 ! 686 719 CALL orchoasis_printpoint(julian, testpt(1), testpt(2), kjpindex, lalo_loc, temp_sol_new, "Produced temp_sol_new") … … 701 734 CALL orchoasis_putvar(itau, dt, kjpindex, kindex - (ii_begin - 1),& 702 735 & vevapp, fluxsens, fluxlat, coastalflow, riverflow, & 703 & netco2, carblu, tsol_rad, temp_sol_new, qsurf, albedo, emis, z0 )736 & netco2, carblu, tsol_rad, temp_sol_new, qsurf, albedo, emis, z0m, z0h) 704 737 ! 705 738 IF ( timemeasure ) THEN … … 723 756 ! 724 757 CALL xios_orchidee_send_field("LandPoints" ,(/ ( REAL(ik), ik=1,kjpindex ) /)) 725 CALL xios_orchidee_send_field("Areas", area) 726 CALL xios_orchidee_send_field("Contfrac",contfrac) 727 CALL xios_orchidee_send_field("evap",vevapp*one_day/dt_sechiba) 728 CALL xios_orchidee_send_field("evap_alma",vevapp/dt_sechiba) 729 CALL xios_orchidee_send_field("coastalflow",coastalflow/dt_sechiba) 730 CALL xios_orchidee_send_field("riverflow",riverflow/dt_sechiba) 731 CALL xios_orchidee_send_field("temp_sol_C",temp_sol_new-ZeroCelsius) 732 CALL xios_orchidee_send_field("temp_sol_K",temp_sol_new) 733 CALL xios_orchidee_send_field("fluxsens",fluxsens) 734 CALL xios_orchidee_send_field("fluxlat",fluxlat) 735 CALL xios_orchidee_send_field("tair",temp_air) 758 CALL xios_orchidee_send_field("areas", area) 759 CALL xios_orchidee_send_field("contfrac",contfrac) 760 CALL xios_orchidee_send_field("temp_air",temp_air) 736 761 CALL xios_orchidee_send_field("qair",qair) 737 762 CALL xios_orchidee_send_field("swnet",swnet) 738 763 CALL xios_orchidee_send_field("swdown",swdown) 739 764 ! zpb in hPa, output in Pa 740 CALL xios_orchidee_send_field(" Psurf",pb*100.)765 CALL xios_orchidee_send_field("pb",pb) 741 766 ! 742 767 IF ( .NOT. almaoutput ) THEN … … 829 854 ! 830 855 CALL histclo 856 ! 831 857 IF(is_root_prc) THEN 832 858 CALL restclo … … 840 866 !- 841 867 CALL orchideeoasis_clear() 842 !843 WRITE(numout,*) "MPI finalized"844 868 !- 845 869 IF ( timemeasure ) THEN … … 855 879 CALL stop_timer(timer_mpi) 856 880 ENDIF 881 ! 882 ! Finalize MPI and XIOS 883 !! CALL Finalize_mpi 884 CALL xios_context_finalize() 885 CALL xios_finalize() 857 886 !- 858 887 CALL oasis_terminate(ierror) 888 !! CALL MPI_FINALIZE(ierr) 859 889 ! 860 890 WRITE(numout,*) "OASIS terminated" … … 875 905 876 906 !- Deallocate all variables existing on all procs (list still incomplete) 877 907 878 908 IF ( ALLOCATED(lon_glo) ) DEALLOCATE(lon_glo) 879 909 IF ( ALLOCATED(lat_glo) ) DEALLOCATE(lat_glo) … … 925 955 IF ( ALLOCATED(albedo) ) DEALLOCATE(albedo) 926 956 IF ( ALLOCATED(emis) ) DEALLOCATE(emis) 927 IF ( ALLOCATED(z0) ) DEALLOCATE(z0) 957 958 !!$ IF ( ALLOCATED(z0m) ) DEALLOCATE(z0m) 959 !!$ IF ( ALLOCATED(z0h) ) DEALLOCATE(z0h) 928 960 929 961 CALL sechiba_clear() -
branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel/mod_orchidee_para.F90
r7792 r8377 41 41 !! \n 42 42 !_ ============================================================================================================================== 43 SUBROUTINE Init_orchidee_para(communicator )43 SUBROUTINE Init_orchidee_para(communicator, usexios) 44 44 IMPLICIT NONE 45 45 INTEGER,OPTIONAL,INTENT(in) :: communicator 46 46 LOGICAL,OPTIONAL,INTENT(in) :: usexios 47 47 48 CALL Init_orchidee_omp 48 49 49 50 50 IF ( PRESENT(communicator) ) THEN 51 CALL Init_orchidee_mpi(communicator) 51 IF ( PRESENT(usexios) ) THEN 52 CALL Init_orchidee_mpi(communicator, usexios) 53 ELSE 54 CALL Init_orchidee_mpi(communicator) 55 ENDIF 52 56 ELSE 53 57 CALL Init_orchidee_mpi 54 58 ENDIF 55 56 59 57 60 IF (is_mpi_root .AND. is_omp_root) THEN -
branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel/xios_orchidee.f90
r8011 r8377 126 126 SUBROUTINE xios_orchidee_init(MPI_COMM_ORCH, & 127 127 date0, year, month, day, julian_diff, & 128 lon_mpi, lat_mpi )128 lon_mpi, lat_mpi, bounds2d_lon_mpi, bounds2d_lat_mpi ) 129 129 130 130 USE grid, ONLY : grid_type, unstructured, regular_lonlat, regular_xy, nvertex, & 131 longitude, latitude, bounds_lon, bounds_lat, ind_cell_glo 131 longitude, latitude, bounds_lon, bounds_lat, ind_cell_glo, NbSegments 132 132 133 133 USE vertical_soil_var, ONLY : znt, znh … … 144 144 REAL(r_std), INTENT(in) :: julian_diff !! Current day in the year [1,365(366)] 145 145 REAL(r_std),DIMENSION (iim_g,jj_nb), INTENT(in) :: lon_mpi, lat_mpi !! Longitudes and latitudes on MPI local domain 2D domain 146 REAL(r_std), OPTIONAL, DIMENSION (NbSegments,iim_g,jj_nb), INTENT(in) :: bounds2d_lon_mpi 147 REAL(r_std), OPTIONAL, DIMENSION (NbSegments,iim_g,jj_nb), INTENT(in) :: bounds2d_lat_mpi 146 148 ! 147 149 !! 0.2 Local variables … … 304 306 ! Global domain 305 307 CALL xios_set_domain_attr("domain_landpoints", ni_glo=iim_g, nj_glo=jjm_g) 306 ! Local MPI domain 307 CALL xios_set_domain_attr("domain_landpoints",type="curvilinear", ibegin=0, ni=iim_g, jbegin=jj_begin-1, nj=jj_nb)308 308 ! Local MPI domain, nvertex is needed here so that XIOS recognises that it is a curvilieanr grid. 309 CALL xios_set_domain_attr("domain_landpoints",type="curvilinear", ibegin=0, ni=iim_g, jbegin=jj_begin-1, & 310 & nj=jj_nb, nvertex=NbSegments) 309 311 ! Define how data is stored on memory : 1D array for only continental points 310 312 CALL xios_set_domain_attr("domain_landpoints",data_dim=1, data_ibegin=0, data_ni=nbp_mpi) … … 314 316 CALL xios_set_domain_attr("domain_landpoints",lonvalue_2d=lon_mpi,latvalue_2d=lat_mpi) 315 317 318 ! If the bounds are provided in the interface then they are used. If not then probably there is an issue. 319 IF (PRESENT(bounds2d_lon_mpi) .AND. PRESENT(bounds2d_lat_mpi)) THEN 320 ! Passing the bounds to XIOS so that the interpolations can be used. 321 CALL xios_set_domain_attr("domain_landpoints",bounds_lon_2d=bounds2d_lon_mpi) 322 CALL xios_set_domain_attr("domain_landpoints",bounds_lat_2d=bounds2d_lat_mpi) 323 ELSE 324 CALL ipslerr_p(3,'xios_orchidee_init', 'For this curvilinear grid the bounds are not provided.',& 325 'This means that the interpolation of fields through XIOS is not possible.', '') 326 ENDIF 327 316 328 ELSE IF (grid_type==unstructured) THEN 317 329 -
branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes_var.f90
r8320 r8377 227 227 ! 2 . Physics 228 228 !- 229 REAL(r_std), PARAMETER :: R_Earth = 6378000. !! radius of the Earth : Earth radius ~= Equatorial radius (m) 229 #ifndef OASIS 230 REAL(r_std), PARAMETER :: R_Earth = 6378000. !! Radius of the Earth : Earth radius ~= Equatorial radius (m) 231 #else 232 REAL(r_std), PARAMETER :: R_Earth = 6370000. !! When coupled through OASIS it is with WRF. We have to use another Earth radius 233 #endif 230 234 REAL(r_std), PARAMETER :: mincos = 0.0001 !! Minimum cosine value used for interpolation (unitless) 231 235 REAL(r_std), PARAMETER :: pb_std = 1013. !! standard pressure (hPa)
Note: See TracChangeset
for help on using the changeset viewer.