Changeset 3790 for LMDZ6/trunk


Ignore:
Timestamp:
Dec 21, 2020, 4:43:24 PM (4 years ago)
Author:
oboucher
Message:

correct cell_area2D in the case of a rectangulat lat-lon grid for singularity at south and north poles
without this correction the calving flux sent to the coupler is not correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/cpl_mod.F90

    r3788 r3790  
    242242    sum_error = sum_error + error
    243243
    244 
    245244    CALL gather_omp(longitude_deg,rlon_mpi)
    246245    CALL gather_omp(latitude_deg,rlat_mpi)
     
    252251      CALL Grid1DTo2D_mpi(rlat_mpi,lat2D)
    253252      CALL Grid1DTo2D_mpi(cell_area_mpi,cell_area2D)
     253      !--the next line is required for lat-lon grid and should have no impact
     254      !--for an unstructured grid for which nbp_lon=1
     255      !--if north pole in process mpi then divide cell area of pole cell by number of replicates
     256      IF (is_north_pole_dyn) cell_area2D(:,1)=cell_area2D(:,1)/FLOAT(nbp_lon)
     257      !--if south pole in process mpi then divide cell area of pole cell by number of replicates
     258      IF (is_south_pole_dyn) cell_area2D(:,jj_nb)=cell_area2D(:,jj_nb)/FLOAT(nbp_lon)
    254259      mask_calving(:,:,:) = 0
    255260      WHERE ( lat2D >= 40) mask_calving(:,:,1) = 1
     
    279284    ENDIF
    280285   
    281            
    282286    IF (sum_error /= 0) THEN
    283287       abort_message='Pb allocation variables couplees'
     
    350354    ENDIF    ! is_sequential
    351355   
    352 
    353356!*************************************************************************************
    354357! compatibility test
Note: See TracChangeset for help on using the changeset viewer.