New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3586 for branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM – NEMO

Ignore:
Timestamp:
2012-11-16T18:42:50+01:00 (11 years ago)
Author:
cbricaud
Message:

add modification from dev_r3342_MERCATOR7_SST in dev_MERCATOR_2012_rev3555

Location:
branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/ARCH/arch-ifort_MERCATOR_CLUSTER.fcm

    r3294 r3586  
    1818%NCDF_LIB            -L $(NETCDF_LIB) -lnetcdf 
    1919%FC                  mpif90 
    20 %FCFLAGS             -assume byterecl  -convert big_endian -i4 -r8 -automatic -align all -O3 
     20%FCFLAGS             -assume byterecl  -convert big_endian -i4 -r8 -automatic -align all -O0 
    2121%FFLAGS              %FCFLAGS 
    2222%LD                  mpif90 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/CONFIG/AMM12/EXP00/namelist

    r3583 r3586  
    869869                           !     ln_ssh                  Logical switch for SSH observations               
    870870 
    871    ln_sst     = .false.    ! Logical switch for SST observations               
    872                            !     ln_reysst               Logical switch for Reynolds observations        
    873                            !     ln_ghrsst               Logical switch for GHRSST observations           
     871   ln_sst     = .true.     ! Logical switch for SST observations 
     872   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations 
     873   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations       
    874874 
    875875   ln_sstfb   = .false.    ! Logical switch for feedback SST data           
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/CONFIG/AMM12_PISCES/EXP00/namelist

    r3309 r3586  
    898898                           !     ln_ssh                  Logical switch for SSH observations               
    899899 
    900    ln_sst     = .false.    ! Logical switch for SST observations               
    901                            !     ln_reysst               Logical switch for Reynolds observations        
    902                            !     ln_ghrsst               Logical switch for GHRSST observations           
     900   ln_sst     = .true.     ! Logical switch for SST observations 
     901   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations 
     902   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations       
    903903 
    904904   ln_sstfb   = .false.    ! Logical switch for feedback SST data           
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/CONFIG/GYRE/EXP00/namelist

    r3306 r3586  
    889889                           !     ln_ssh                  Logical switch for SSH observations               
    890890 
    891    ln_sst     = .false.    ! Logical switch for SST observations               
    892                            !     ln_reysst               Logical switch for Reynolds observations        
    893                            !     ln_ghrsst               Logical switch for GHRSST observations           
     891   ln_sst     = .true.     ! Logical switch for SST observations               
     892   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations        
     893   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations           
    894894 
    895895   ln_sstfb   = .false.    ! Logical switch for feedback SST data           
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist

    r3306 r3586  
    893893                           !     ln_ssh                  Logical switch for SSH observations               
    894894 
    895    ln_sst     = .false.    ! Logical switch for SST observations               
    896                            !     ln_reysst               Logical switch for Reynolds observations        
    897                            !     ln_ghrsst               Logical switch for GHRSST observations           
     895   ln_sst     = .true.     ! Logical switch for SST observations 
     896   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations 
     897   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations       
    898898 
    899899   ln_sstfb   = .false.    ! Logical switch for feedback SST data           
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist

    r3306 r3586  
    890890                           !     ln_ssh                  Logical switch for SSH observations               
    891891 
    892    ln_sst     = .false.    ! Logical switch for SST observations               
    893                            !     ln_reysst               Logical switch for Reynolds observations        
    894                            !     ln_ghrsst               Logical switch for GHRSST observations           
     892   ln_sst     = .true.     ! Logical switch for SST observations 
     893   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations 
     894   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations       
    895895 
    896896   ln_sstfb   = .false.    ! Logical switch for feedback SST data           
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90

    r3294 r3586  
    106106   LOGICAL, DIMENSION(:), ALLOCATABLE :: & 
    107107      & ld_velav     !: Velocity data is daily averaged 
     108   LOGICAL, DIMENSION(:), ALLOCATABLE :: & 
     109      & ld_sstnight  !: SST observation corresponds to night mean 
    108110 
    109111   !!---------------------------------------------------------------------- 
     
    737739         ALLOCATE(sstdata(nsstsets)) 
    738740         ALLOCATE(sstdatqc(nsstsets)) 
     741         ALLOCATE(ld_sstnight(nsstsets)) 
    739742         sstdata(:)%nsurf=0 
    740          sstdatqc(:)%nsurf=0          
     743         sstdatqc(:)%nsurf=0     
     744         ld_sstnight(:)=.false. 
    741745 
    742746         nsstsets = 0 
     
    745749 
    746750            nsstsets = nsstsets + 1 
     751 
     752            ld_sstnight(nsstsets) = .TRUE. 
    747753 
    748754            CALL obs_rea_sst_rey( reysstname, reysstfmt, sstdata(nsstsets), & 
     
    757763         
    758764            nsstsets = nsstsets + 1 
     765 
     766            ld_sstnight(nsstsets) = .TRUE. 
    759767           
    760768            CALL obs_rea_sst( 1, sstdata(nsstsets), jnumsst, & 
     
    774782             
    775783               nsstsets = nsstsets + 1 
     784 
     785               ld_sstnight(nsstsets) = .TRUE. 
    776786             
    777787               CALL obs_rea_sst( 0, sstdata(nsstsets), 1, & 
     
    10921102      IF ( ln_sst ) THEN 
    10931103         DO jsstset = 1, nsstsets 
    1094             CALL obs_sst_opt( sstdatqc(jsstset),                 & 
    1095                &              kstp, jpi, jpj, nit000, tsn(:,:,1,jp_tem), & 
    1096                &              tmask(:,:,1), n2dint ) 
     1104            CALL obs_sst_opt( sstdatqc(jsstset),                & 
     1105               &              kstp, jpi, jpj, nit000, idaystp,  & 
     1106               &              tsn(:,:,1,jp_tem), tmask(:,:,1),  & 
     1107               &              n2dint, ld_sstnight(jsstset) ) 
    10971108         END DO 
    10981109      ENDIF 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90

    r2715 r3586  
    614614   END SUBROUTINE obs_sla_opt 
    615615 
    616    SUBROUTINE obs_sst_opt( sstdatqc, kt, kpi, kpj, kit000, & 
    617       &                    psstn, psstmask, k2dint ) 
    618  
     616   SUBROUTINE obs_sst_opt( sstdatqc, kt, kpi, kpj, kit000, kdaystp, & 
     617      &                    psstn, psstmask, k2dint, ld_nightav ) 
    619618      !!----------------------------------------------------------------------- 
    620619      !! 
     
    647646      !! * Modules used 
    648647      USE obs_surf_def  ! Definition of storage space for surface observations 
     648      USE sbcdcy 
    649649 
    650650      IMPLICIT NONE 
     
    659659                                       !   (kit000-1 = restart time) 
    660660      INTEGER, INTENT(IN) :: k2dint    ! Horizontal interpolation type (see header) 
     661      INTEGER, INTENT(IN) :: kdaystp   ! Number of time steps per day   
    661662      REAL(KIND=wp), INTENT(IN), DIMENSION(kpi,kpj) :: & 
    662663         & psstn,  &    ! Model SST field 
    663664         & psstmask     ! Land-sea mask 
    664           
     665 
    665666      !! * Local declarations 
    666667      INTEGER :: ji 
     
    670671      INTEGER :: isst 
    671672      INTEGER :: iobs 
     673      INTEGER :: idayend 
    672674      REAL(KIND=wp) :: zlam 
    673675      REAL(KIND=wp) :: zphi 
    674676      REAL(KIND=wp) :: zext(1), zobsmask(1) 
     677      REAL(KIND=wp) :: zdaystp 
     678      INTEGER, DIMENSION(:,:), SAVE, ALLOCATABLE :: & 
     679         & icount_sstnight,      & 
     680         & imask_night 
     681      REAL(kind=wp), DIMENSION(:,:), SAVE, ALLOCATABLE :: & 
     682         & zintmp, & 
     683         & zouttmp, &  
     684         & zmeanday    ! to compute model sst in region of 24h daylight (pole) 
    675685      REAL(kind=wp), DIMENSION(2,2,1) :: & 
    676686         & zweig 
     
    678688         & zmask, & 
    679689         & zsstl, & 
     690         & zsstm, & 
    680691         & zglam, & 
    681692         & zgphi 
     
    683694         & igrdi, & 
    684695         & igrdj 
     696      LOGICAL, INTENT(IN) :: ld_nightav 
    685697 
    686698      !----------------------------------------------------------------------- 
     
    690702      inrc = kt - kit000 + 2 
    691703      isst = sstdatqc%nsstp(inrc) 
     704 
     705      IF ( ld_nightav ) THEN 
     706 
     707      ! Initialize array for night mean 
     708 
     709      IF ( kt .EQ. 0 ) THEN 
     710         ALLOCATE ( icount_sstnight(kpi,kpj) ) 
     711         ALLOCATE ( imask_night(kpi,kpj) ) 
     712         ALLOCATE ( zintmp(kpi,kpj) ) 
     713         ALLOCATE ( zouttmp(kpi,kpj) ) 
     714         ALLOCATE ( zmeanday(kpi,kpj) ) 
     715         nday_qsr = -1   ! initialisation flag for nbc_dcy 
     716      ENDIF 
     717 
     718      ! Initialize daily mean for first timestep 
     719      idayend = MOD( kt - kit000 + 1, kdaystp ) 
     720 
     721      ! Added kt == 0 test to catch restart case  
     722      IF ( idayend == 1 .OR. kt == 0) THEN 
     723         IF (lwp) WRITE(numout,*) 'Reset sstdatqc%vdmean on time-step: ',kt 
     724         DO jj = 1, jpj 
     725            DO ji = 1, jpi 
     726               sstdatqc%vdmean(ji,jj) = 0.0 
     727               zmeanday(ji,jj) = 0.0 
     728               icount_sstnight(ji,jj) = 0 
     729            END DO 
     730         END DO 
     731      ENDIF 
     732 
     733      zintmp(:,:) = 0.0 
     734      zouttmp(:,:) = sbc_dcy( zintmp(:,:), .TRUE. ) 
     735      imask_night(:,:) = INT( zouttmp(:,:) ) 
     736 
     737      DO jj = 1, jpj 
     738         DO ji = 1, jpi 
     739            ! Increment the temperature field for computing night mean and counter 
     740            sstdatqc%vdmean(ji,jj) = sstdatqc%vdmean(ji,jj)  & 
     741                   &                        + psstn(ji,jj)*imask_night(ji,jj) 
     742            zmeanday(ji,jj)        = zmeanday(ji,jj) + psstn(ji,jj) 
     743            icount_sstnight(ji,jj) = icount_sstnight(ji,jj) + imask_night(ji,jj) 
     744         END DO 
     745      END DO 
     746    
     747      ! Compute the daily mean at the end of day 
     748 
     749      zdaystp = 1.0 / REAL( kdaystp ) 
     750 
     751      IF ( idayend == 0 ) THEN  
     752         DO jj = 1, jpj 
     753            DO ji = 1, jpi 
     754               ! Test if "no night" point 
     755               IF ( icount_sstnight(ji,jj) .NE. 0 ) THEN 
     756                  sstdatqc%vdmean(ji,jj) = sstdatqc%vdmean(ji,jj) & 
     757                    &                        / icount_sstnight(ji,jj)  
     758               ELSE 
     759                  sstdatqc%vdmean(ji,jj) = zmeanday(ji,jj) * zdaystp 
     760               ENDIF 
     761            END DO 
     762         END DO 
     763      ENDIF 
     764 
     765      ENDIF 
    692766 
    693767      ! Get the data for interpolation 
     
    722796      CALL obs_int_comm_2d( 2, 2, isst, & 
    723797         &                  igrdi, igrdj, psstn, zsstl ) 
    724        
     798 
     799      ! At the end of the day get interpolated means 
     800      IF ( idayend == 0 .AND. ld_nightav ) THEN 
     801 
     802         ALLOCATE( & 
     803            & zsstm(2,2,isst)  & 
     804            & ) 
     805 
     806         CALL obs_int_comm_2d( 2, 2, isst, igrdi, igrdj, & 
     807            &               sstdatqc%vdmean(:,:), zsstm ) 
     808 
     809      ENDIF 
     810 
    725811      ! Loop over observations 
    726812 
     
    756842             
    757843         ! Interpolate the model SST to the observation point  
    758          CALL obs_int_h2d( 1, 1,      & 
     844 
     845         IF ( ld_nightav ) THEN 
     846 
     847           IF ( idayend == 0 )  THEN 
     848               ! Daily averaged/diurnal cycle of SST  data 
     849               CALL obs_int_h2d( 1, 1,      &  
     850                     &              zweig, zsstm(:,:,iobs), zext ) 
     851            ELSE  
     852               CALL ctl_stop( ' ld_nightav is set to true: a nonzero' //     & 
     853                     &           ' number of night SST data should' // & 
     854                     &           ' only occur at the end of a given day' ) 
     855            ENDIF 
     856 
     857         ELSE 
     858 
     859            CALL obs_int_h2d( 1, 1,      & 
    759860            &              zweig, zsstl(:,:,iobs),  zext ) 
     861 
     862         ENDIF 
    760863          
    761864         sstdatqc%rmod(jobs,1) = zext(1) 
     
    772875         & zsstl  & 
    773876         & ) 
     877 
     878      ! At the end of the day also get interpolated means 
     879      IF ( idayend == 0 .AND. ld_nightav ) THEN 
     880         DEALLOCATE( & 
     881            & zsstm  & 
     882            & ) 
     883      ENDIF 
    774884       
    775885      sstdatqc%nsurfup = sstdatqc%nsurfup + isst 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_seaice.F90

    r2287 r3586  
    326326         &               iindx   ) 
    327327       
    328       CALL obs_surf_alloc( seaicedata, iobs, kvars, kextr, kstp ) 
     328      CALL obs_surf_alloc( seaicedata, iobs, &  
     329                           kvars, kextr, kstp, jpi, jpj ) 
    329330       
    330331      ! * Read obs/positions, QC, all variable and assign to seaicedata 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sla.F90

    r2287 r3586  
    391391         &               iindx   ) 
    392392       
    393       CALL obs_surf_alloc( sladata, iobs, kvars, kextr, kstp ) 
     393      CALL obs_surf_alloc( sladata, iobs, kvars, kextr, & 
     394         &                 jpi, jpj, kstp ) 
    394395       
    395396      ! * Read obs/positions, QC, all variable and assign to sladata 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sst.F90

    r2287 r3586  
    326326         &               iindx   ) 
    327327       
    328       CALL obs_surf_alloc( sstdata, iobs, kvars, kextr, kstp ) 
     328      CALL obs_surf_alloc( sstdata, iobs, kvars, kextr, kstp, jpi, jpj ) 
    329329       
    330330      ! * Read obs/positions, QC, all variable and assign to sstdata 
     
    701701      ! Allocate obs_surf data structure for time sorted data 
    702702          
    703       CALL obs_surf_alloc( sstdata, inumobs, kvars, kextra, kstp ) 
     703      CALL obs_surf_alloc( sstdata, inumobs, kvars, kextra, kstp, jpi, jpj ) 
    704704 
    705705      pjul = pjulini + 1 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/OBS/obs_surf_def.F90

    r2287 r3586  
    4747      INTEGER :: nextra     !: Number of extra fields at observation points 
    4848      INTEGER :: nstp       !: Number of time steps 
     49      INTEGER :: npi        !: Number of 3D grid points 
     50      INTEGER :: npj 
    4951      INTEGER :: nsurfup    !: Observation counter used in obs_oper 
    5052 
     
    7981         & rext           !: Extra fields interpolated to observation points 
    8082 
     83      REAL(KIND=wp), POINTER, DIMENSION(:,:) :: & 
     84         & vdmean         !: Time averaged of model field 
     85 
    8186      ! Arrays with size equal to the number of time steps in the window 
    8287 
     
    103108CONTAINS 
    104109    
    105    SUBROUTINE obs_surf_alloc( surf, ksurf, kvar, kextra, kstp ) 
     110   SUBROUTINE obs_surf_alloc( surf, ksurf, kvar, kextra, kstp, kpi, kpj ) 
    106111      !!---------------------------------------------------------------------- 
    107112      !!                     ***  ROUTINE obs_surf_alloc  *** 
     
    120125      INTEGER, INTENT(IN) :: kextra  ! Number of extra fields at observation points 
    121126      INTEGER, INTENT(IN) :: kstp    ! Number of time steps 
     127      INTEGER, INTENT(IN) :: kpi     ! Number of 3D grid points 
     128      INTEGER, INTENT(IN) :: kpj 
    122129 
    123130      !!* Local variables 
     
    131138      surf%nvar     = kvar 
    132139      surf%nstp     = kstp 
     140      surf%npi      = kpi 
     141      surf%npj      = kpj 
    133142       
    134143      ! Allocate arrays of number of surface data size 
     
    174183         & ) 
    175184 
     185      ! Allocate arrays of size number of grid points 
     186 
     187      ALLOCATE( & 
     188         & surf%vdmean(kpi,kpj) & 
     189         & ) 
     190 
    176191      ! Set defaults for compression indices 
    177192       
     
    242257         & ) 
    243258 
     259      ! Deallocate arrays of size number of grid points size times 
     260      ! number of variables 
     261 
     262      DEALLOCATE( & 
     263         & surf%vdmean & 
     264         & ) 
     265 
    244266      ! Deallocate arrays of number of time step size 
    245267 
     
    300322      IF ( lallocate ) THEN 
    301323         CALL obs_surf_alloc( newsurf,  insurf, surf%nvar, & 
    302             & surf%nextra, surf%nstp ) 
     324            & surf%nextra, surf%nstp, surf%npi, surf%npj ) 
    303325      ENDIF 
    304326 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90

    r3294 r3586  
    4949 
    5050 
    51    FUNCTION sbc_dcy( pqsrin ) RESULT( zqsrout ) 
     51   FUNCTION sbc_dcy( pqsrin, l_mask ) RESULT( zqsrout ) 
    5252      !!---------------------------------------------------------------------- 
    5353      !!                  ***  ROUTINE sbc_dcy  *** 
     
    6363      !!              Part 1: a diurnally forced OGCM. Climate Dynamics 29:6, 575-590. 
    6464      !!---------------------------------------------------------------------- 
     65      LOGICAL, OPTIONAL, INTENT(in) :: l_mask ! use the routine for night mask computation 
    6566      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pqsrin    ! input daily QSR flux  
    6667      !! 
    6768      INTEGER  ::   ji, jj                                       ! dummy loop indices 
     69      INTEGER, DIMENSION(jpi,jpj) :: imask_night ! night mask 
    6870      REAL(wp) ::   ztwopi, zinvtwopi, zconvrad  
    6971      REAL(wp) ::   zlo, zup, zlousd, zupusd 
    7072      REAL(wp) ::   zdsws, zdecrad, ztx, zsin, zcos 
    7173      REAL(wp) ::   ztmp, ztmp1, ztmp2, ztest 
     74      REAL(wp) ::   ztmpm, ztmpm1, ztmpm2 
    7275      REAL(wp), DIMENSION(jpi,jpj) ::   zqsrout                  ! output QSR flux with diurnal cycle 
    7376      !---------------------------statement functions------------------------ 
     
    9093      zup = zlo + ( REAL(nn_fsbc, wp)     * rdttra(1) ) / rday 
    9194      !                                           
    92       IF( nday_qsr == -1 ) THEN       ! first time step only                
     95      IF( nday_qsr == -1 ) THEN       ! first time step only   
    9396         IF(lwp) THEN 
    9497            WRITE(numout,*) 
     
    120123         zdecrad = (-23.5 * zconvrad) * COS( zdsws * ztwopi / REAL(nyear_len(1),wp) ) 
    121124         ! Compute A and B needed to compute the time integral of the diurnal cycle 
    122          
     125 
    123126         zsin = SIN( zdecrad )   ;   zcos = COS( zdecrad ) 
    124127         DO jj = 1, jpj 
     
    129132            END DO   
    130133         END DO   
    131  
    132134         ! Compute the time of dawn and dusk 
    133135 
     
    156158         rdawn(:,:) = MOD( (rdawn(:,:) + 1._wp), 1._wp ) 
    157159         rdusk(:,:) = MOD( (rdusk(:,:) + 1._wp), 1._wp ) 
    158  
    159160         !     2.2 Compute the scalling function: 
    160161         !         S* = the inverse of the time integral of the diurnal cycle from dawm to dusk 
     
    185186         ! 
    186187      ENDIF  
    187  
    188188         !     3. update qsr with the diurnal cycle 
    189189         !     ------------------------------------ 
    190190 
     191      imask_night(:,:) = 0 
    191192      DO jj = 1, jpj 
    192193         DO ji = 1, jpi 
     194            ztmpm = 0.0 
    193195            IF( ABS(rab(ji,jj)) < 1 ) THEN         ! day duration is less than 24h 
    194196               ! 
     
    200202                  ztmp = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj))  
    201203                  zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 
     204                  ztmpm = zupusd - zlousd 
     205                  IF ( ztmpm .EQ. 0 ) imask_night(ji,jj) = 1 
    202206                  ! 
    203207               ELSE                                         ! day time in two parts 
     
    205209                  zupusd = MIN(zup, rdusk(ji,jj)) 
    206210                  ztmp1 = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj))  
     211                  ztmpm1=zupusd-zlousd 
    207212                  zlousd = MAX(zlo, rdawn(ji,jj)) 
    208213                  zupusd = MAX(zup, rdawn(ji,jj)) 
    209214                  ztmp2 = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj))  
     215                  ztmpm2 =zupusd-zlousd 
    210216                  ztmp = ztmp1 + ztmp2 
     217                  ztmpm = ztmpm1 + ztmpm2 
    211218                  zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 
     219                  IF (ztmpm .EQ. 0.) imask_night(ji,jj) = 1 
    212220               ENDIF 
    213221            ELSE                                   ! 24h light or 24h night 
     
    216224                  ztmp = fintegral(zlo, zup, raa(ji,jj), rbb(ji,jj), rcc(ji,jj))  
    217225                  zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 
     226                  imask_night(ji,jj) = 0 
    218227                  ! 
    219228               ELSE                                         ! No day 
    220229                  zqsrout(ji,jj) = 0.e0 
     230                  imask_night(ji,jj) = 1 
    221231               ENDIF 
    222232            ENDIF 
    223233         END DO   
    224234      END DO   
     235      ! 
     236      IF ( PRESENT(l_mask) .AND. l_mask ) THEN 
     237         zqsrout(:,:) = float(imask_night(:,:)) 
     238      ENDIF 
    225239      ! 
    226240      IF( nn_timing == 1 )  CALL timing_stop('sbc_dcy') 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER

    r3583 r3586  
    5757#  Run the parallel MPI executable  
    5858# 
     59  echo "Running time ${MPIRUN} ./opa" 
     60# 
    5961  if [ MPI_FLAG == "yes" ]; then 
    60   echo "Running time ${MPIRUN} ./opa" 
    61      time ${MPIRUN} ./opa 
     62#cbr     time ${MPIRUN} ./opa 
     63     mpirun -np $OCEANCORES ./opa 
    6264#cbr     mpirun -np $OCEANCORES ./opa 
    6365  else 
    64   echo "Running time ./opa" 
    6566     time ./opa 
    6667  fi 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/SETTE/prepare_job.sh

    r3583 r3586  
    1111# prepare_job.sh   : creates the job script for running job  
    1212###################################################### 
    13 #set -vx 
     13#set -x 
    1414set -o posix 
    1515#set -u 
    1616#set -e 
    17 #+ 
     17# 
    1818# 
    1919# ================ 
     
    3030# :: 
    3131# 
    32 #  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE 
     32#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
    3333# 
    3434# 
     
    3636# =========== 
    3737# 
    38 # Part of the SETTE package to run tests for NEMO 
     38# Simple job for SET TESTS for NEMO (SETTE) 
    3939#  
    40 # prepare the script $JOB_FILE to run the tests  
     40#   get input files (if needed) : tar file   
     41#  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name) 
     42# 
     43#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are 
     44# 
     45#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory 
     46# 
     47#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output) 
    4148# 
    4249# EXAMPLES 
     
    4552# :: 
    4653# 
    47 #  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG $JOB_FILE 
    48 # 
    49 # prepare the $JOB_FILE for execution  
     54#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
     55# 
     56#  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun 
     57#  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no 
     58# 
     59#  run a job of config ORCA2_LIM_PISCES   with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun 
     60#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes 
    5061# 
    5162# 
     
    5970# ========== 
    6071# 
    61 # $Id: prepare_job.sh 3050 2011-11-07 14:11:34Z acc $ 
     72# $Id: fcm_job.sh 3050 2011-11-07 14:11:34Z acc $ 
    6273# 
    6374# 
     
    6879# 
    6980 
    70 usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE" 
    71 usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE" 
     81usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG" 
     82usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes" 
    7283 
    7384 
     
    7586        if [ ${#} -lt ${minargcount} ] 
    7687        then 
    77                 echo "not enough arguments for prepare_job.sh script" 
    78                 echo "control number of argument of prepare_job.sh in sette.sh" 
     88                echo "not enought arguments for fcm_job.sh script" 
     89                echo "control number of argument of fcm_job.sh in sette.sh" 
    7990                echo "${usage}" 
    8091        exit 1 
     
    159170    exit 1 
    160171fi 
    161  
     172#if [ ${NB_PROC} == 1 ] ; then 
     173#    echo "running opa" >> ${SETTE_DIR}/output.sette 
     174#    echo "            " >> ${SETTE_DIR}/output.sette 
     175#    ./opa 
     176# 
     177# Tidy out output from this test and populate the NEMO_VALIDATION_DIR tree 
     178# 
     179#    post_test_tidyup 
     180#else 
     181#    echo "running opa in MPI" >> ${SETTE_DIR}/output.sette 
     182#    echo "            " >> ${SETTE_DIR}/output.sette 
     183 
     184#    if [ ${MPI_INTERACT} == "yes" ] ; then 
     185#  # 
     186#  # example for brodie (NEC SX8) machine 
     187#  #  mpirun -np ${NB_PROC} opa 
     188#  # example for dedale machine 
     189#  #  mpirun --mca btl self,tcp -np ${NB_PROC} opa 
     190#  # example for vargas (IBM Power6) machine 
     191#  mpiexec -n ${NB_PROC} opa 
     192#  # 
     193#  post_test_tidyup 
     194#    fi 
     195# 
    162196# example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file) 
    163197# 
    164   #  if [ ${MPI_FLAG} == "no" ] ; then 
     198  #  if [ ${MPI_INTERACT} == "no" ] ; then 
    165199      case ${COMPILER} in  
    166200         ALTIX_NAUTILUS_MPT) 
     
    214248             -e"s/NPROCS/${NB_PROC}/" \ 
    215249             -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \ 
     250             -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \ 
    216251             -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \ 
    217252             -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ 
     
    237272   fi 
    238273    
    239    chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready" 
     274   chmod a+x $JOB_FILE 
    240275 
    241276#fi 
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/SETTE/sette.sh

    r3555 r3586  
    129129#- 
    130130# Compiler among those in NEMOGCM/ARCH 
    131 COMPILER=PW6_VARGAS 
    132 export BATCH_COMMAND_PAR="llsubmit" 
     131COMPILER=ifort_MERCATOR_CLUSTER  
     132export BATCH_COMMAND_PAR="qsub" 
    133133export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR 
    134134export INTERACT_FLAG="no" 
     
    147147cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit 
    148148 
    149 for config in 1 2 3 4 5 6 7 8 9 
     149for config in 1 2 3 4 5 6 7 8 
    150150do 
    151151 
Note: See TracChangeset for help on using the changeset viewer.