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 9818 – NEMO

Changeset 9818


Ignore:
Timestamp:
2018-06-21T12:32:55+02:00 (6 years ago)
Author:
dancopsey
Message:

Add min and max prints to nemo2cice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_nemo2cice_prints/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r9817 r9818  
    218218         ! there is no restart file. 
    219219         ! Values from a CICE restart file would overwrite this 
    220          CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1.)  
     220         CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1., 'sst1')  
    221221#endif 
    222222 
     
    225225      ! calculate surface freezing temperature and send to CICE 
    226226      CALL  eos_fzp(sss_m(:,:), sstfrz(:,:), fsdept_n(:,:,1))  
    227       CALL nemo2cice(sstfrz,Tf, 'T', 1. ) 
     227      CALL nemo2cice(sstfrz,Tf, 'T', 1., 'tfl' ) 
    228228 
    229229      CALL cice2nemo(aice,fr_i, 'T', 1. ) 
     
    353353            ENDDO 
    354354         ENDDO 
    355          CALL nemo2cice(ztmp,strax,'F', -1. ) 
     355         CALL nemo2cice(ztmp,strax,'F', -1. , 'strax') 
    356356 
    357357! y comp of wind stress (CI_2) 
     
    363363            ENDDO 
    364364         ENDDO 
    365          CALL nemo2cice(ztmp,stray,'F', -1. ) 
     365         CALL nemo2cice(ztmp,stray,'F', -1. , 'stray') 
    366366 
    367367 
     
    392392 
    393393         DO jl=1,ncat 
    394             CALL nemo2cice(ztmpn(:,:,jl),flatn_f(:,:,jl,:),'T', 1. ) 
     394            CALL nemo2cice(ztmpn(:,:,jl),flatn_f(:,:,jl,:),'T', 1., 'flatn' ) 
    395395 
    396396! GBM conductive flux through ice (CI_6) 
     
    401401               ztmp(:,:) = botmelt(:,:,jl) 
    402402            ENDIF 
    403             CALL nemo2cice(ztmp,fcondtopn_f(:,:,jl,:),'T', 1. ) 
     403            CALL nemo2cice(ztmp,fcondtopn_f(:,:,jl,:),'T', 1., 'fcondtopn' ) 
    404404 
    405405! GBM surface heat flux (CI_7) 
     
    410410               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl)) 
    411411            ENDIF 
    412             CALL nemo2cice(ztmp,fsurfn_f(:,:,jl,:),'T', 1. ) 
     412            CALL nemo2cice(ztmp,fsurfn_f(:,:,jl,:),'T', 1., 'fsurfn_f' ) 
    413413         ENDDO 
    414414 
     
    418418! x comp and y comp of atmosphere surface wind (CICE expects on T points) 
    419419         ztmp(:,:) = wndi_ice(:,:) 
    420          CALL nemo2cice(ztmp,uatm,'T', -1. ) 
     420         CALL nemo2cice(ztmp,uatm,'T', -1., 'uatm' ) 
    421421         ztmp(:,:) = wndj_ice(:,:) 
    422          CALL nemo2cice(ztmp,vatm,'T', -1. ) 
     422         CALL nemo2cice(ztmp,vatm,'T', -1. , 'vatm') 
    423423         ztmp(:,:) = SQRT ( wndi_ice(:,:)**2 + wndj_ice(:,:)**2 ) 
    424          CALL nemo2cice(ztmp,wind,'T', 1. )    ! Wind speed (m/s) 
     424         CALL nemo2cice(ztmp,wind,'T', 1., 'wind' )    ! Wind speed (m/s) 
    425425         ztmp(:,:) = qsr_ice(:,:,1) 
    426          CALL nemo2cice(ztmp,fsw,'T', 1. )     ! Incoming short-wave (W/m^2) 
     426         CALL nemo2cice(ztmp,fsw,'T', 1., 'fsw' )     ! Incoming short-wave (W/m^2) 
    427427         ztmp(:,:) = qlw_ice(:,:,1) 
    428          CALL nemo2cice(ztmp,flw,'T', 1. )     ! Incoming long-wave (W/m^2) 
     428         CALL nemo2cice(ztmp,flw,'T', 1., 'flw' )     ! Incoming long-wave (W/m^2) 
    429429         ztmp(:,:) = tatm_ice(:,:) 
    430          CALL nemo2cice(ztmp,Tair,'T', 1. )    ! Air temperature (K) 
    431          CALL nemo2cice(ztmp,potT,'T', 1. )    ! Potential temp (K) 
     430         CALL nemo2cice(ztmp,Tair,'T', 1., 'tair' )    ! Air temperature (K) 
     431         CALL nemo2cice(ztmp,potT,'T', 1. , 'pott')    ! Potential temp (K) 
    432432! Following line uses MAX(....) to avoid problems if tatm_ice has unset halo rows   
    433433         ztmp(:,:) = 101000. / ( 287.04 * MAX(1.0,tatm_ice(:,:)) )     
    434434                                               ! Constant (101000.) atm pressure assumed 
    435          CALL nemo2cice(ztmp,rhoa,'T', 1. )    ! Air density (kg/m^3) 
     435         CALL nemo2cice(ztmp,rhoa,'T', 1., 'rhoa' )    ! Air density (kg/m^3) 
    436436         ztmp(:,:) = qatm_ice(:,:) 
    437          CALL nemo2cice(ztmp,Qa,'T', 1. )      ! Specific humidity (kg/kg) 
     437         CALL nemo2cice(ztmp,Qa,'T', 1., 'qa' )      ! Specific humidity (kg/kg) 
    438438         ztmp(:,:)=10.0 
    439          CALL nemo2cice(ztmp,zlvl,'T', 1. )    ! Atmos level height (m) 
     439         CALL nemo2cice(ztmp,zlvl,'T', 1., 'zlvl' )    ! Atmos level height (m) 
    440440 
    441441! May want to check all values are physically realistic (as in CICE routine  
     
    444444! Divide shortwave into spectral bands (as in prepare_forcing) 
    445445         ztmp(:,:)=qsr_ice(:,:,1)*frcvdr       ! visible direct 
    446          CALL nemo2cice(ztmp,swvdr,'T', 1. )              
     446         CALL nemo2cice(ztmp,swvdr,'T', 1., 'swvdr' )              
    447447         ztmp(:,:)=qsr_ice(:,:,1)*frcvdf       ! visible diffuse 
    448          CALL nemo2cice(ztmp,swvdf,'T', 1. )               
     448         CALL nemo2cice(ztmp,swvdf,'T', 1., 'swvdf' )               
    449449         ztmp(:,:)=qsr_ice(:,:,1)*frcidr       ! near IR direct 
    450          CALL nemo2cice(ztmp,swidr,'T', 1. ) 
     450         CALL nemo2cice(ztmp,swidr,'T', 1., 'swidr' ) 
    451451         ztmp(:,:)=qsr_ice(:,:,1)*frcidf       ! near IR diffuse 
    452          CALL nemo2cice(ztmp,swidf,'T', 1. ) 
     452         CALL nemo2cice(ztmp,swidf,'T', 1., 'swidf' ) 
    453453 
    454454      ENDIF 
     
    458458      IF( iom_use('snowpre') )   CALL iom_put('snowpre',MAX( (1.0-fr_i(:,:))*sprecip(:,:) ,0.0)) !!Joakim edit   
    459459      ztmp(:,:)=MAX(fr_i(:,:)*sprecip(:,:),0.0)   
    460       CALL nemo2cice(ztmp,fsnow,'T', 1. )  
     460      CALL nemo2cice(ztmp,fsnow,'T', 1., 'fsnow' )  
    461461 
    462462! Rainfall 
    463463      IF( iom_use('precip') )   CALL iom_put('precip', (1.0-fr_i(:,:))*(tprecip(:,:)-sprecip(:,:)) ) !!Joakim edit 
    464464      ztmp(:,:)=fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 
    465       CALL nemo2cice(ztmp,frain,'T', 1. )  
     465      CALL nemo2cice(ztmp,frain,'T', 1., 'frain' )  
    466466 
    467467! Recalculate freezing temperature and send to CICE  
    468468      CALL eos_fzp(sss_m(:,:), sstfrz(:,:), fsdept_n(:,:,1))  
    469       CALL nemo2cice(sstfrz,Tf,'T', 1. ) 
     469      CALL nemo2cice(sstfrz,Tf,'T', 1., 'Tf' ) 
    470470 
    471471! Freezing/melting potential 
    472472! Calculated over NEMO leapfrog timestep (hence 2*dt) 
    473473      nfrzmlt(:,:)=rau0*rcp*fse3t_m(:,:)*(sstfrz(:,:)-sst_m(:,:))/(2.0*dt)  
    474       CALL nemo2cice(nfrzmlt,frzmlt,'T', 1. ) 
     474      CALL nemo2cice(nfrzmlt,frzmlt,'T', 1., 'frzmlt' ) 
    475475 
    476476! SST  and SSS 
    477477 
    478       CALL nemo2cice(sst_m,sst,'T', 1. ) 
    479       CALL nemo2cice(sss_m,sss,'T', 1. ) 
     478      CALL nemo2cice(sst_m,sst,'T', 1.,'sst' ) 
     479      CALL nemo2cice(sss_m,sss,'T', 1.,'sss' ) 
    480480 
    481481      IF( ksbc == jp_purecpl ) THEN 
    482482! Sea ice surface skin temperature 
    483483         DO jl=1,ncat 
    484            CALL nemo2cice(tsfc_ice(:,:,jl), trcrn(:,:,nt_tsfc,jl,:),'T',1.) 
     484           CALL nemo2cice(tsfc_ice(:,:,jl), trcrn(:,:,nt_tsfc,jl,:),'T',1., 'trcrn') 
    485485         ENDDO  
    486486      ENDIF 
     
    493493         ENDDO 
    494494      ENDDO 
    495       CALL nemo2cice(ztmp,uocn,'F', -1. ) 
     495      CALL nemo2cice(ztmp,uocn,'F', -1., 'uocn' ) 
    496496 
    497497! V point to F point 
     
    501501         ENDDO 
    502502      ENDDO 
    503       CALL nemo2cice(ztmp,vocn,'F', -1. ) 
     503      CALL nemo2cice(ztmp,vocn,'F', -1., 'vocn' ) 
    504504 
    505505      IF( nn_ice_embd == 2 ) THEN             !== embedded sea ice: compute representative ice top surface ==! 
     
    529529         ENDDO 
    530530      ENDDO 
    531       CALL nemo2cice(ztmp,ss_tltx,'F', -1. ) 
     531      CALL nemo2cice(ztmp,ss_tltx,'F', -1., 'ss_tltx' ) 
    532532 
    533533! T point to F point 
     
    539539         ENDDO 
    540540      ENDDO 
    541       CALL nemo2cice(ztmp,ss_tlty,'F', -1. ) 
     541      CALL nemo2cice(ztmp,ss_tlty,'F', -1., 'ss_tlty' ) 
    542542 
    543543      CALL wrk_dealloc( jpi,jpj, ztmp, zpice ) 
     
    925925   END SUBROUTINE cice_sbc_force 
    926926 
    927    SUBROUTINE nemo2cice( pn, pc, cd_type, psgn) 
     927   SUBROUTINE nemo2cice( pn, pc, cd_type, psgn, varname) 
    928928      !!--------------------------------------------------------------------- 
    929929      !!                    ***  ROUTINE nemo2cice  *** 
     
    957957#endif 
    958958      REAL (kind=dbl_kind), dimension(nx_block,ny_block,max_blocks) :: pc 
     959      CHARACTER(len=10), INTENT( in ) :: varname 
    959960      INTEGER (int_kind) :: & 
    960961         field_type,        &! id for type of field (scalar, vector, angle) 
     
    10341035      CALL scatter_global(pc, pcg, 0, distrb_info, grid_loc, field_type) 
    10351036#endif 
     1037 
     1038   IF ( ln_ctl ) THEN 
     1039      WRITE(numout,*)'nemo2cice: ',varname,' min,max = ',MINVAL(pc(:,:,:)), MAXVAL(pc(:,:,:)) 
     1040      CALL flush(numout) 
     1041   ENDIF 
    10361042 
    10371043   END SUBROUTINE nemo2cice 
Note: See TracChangeset for help on using the changeset viewer.