Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:37:36 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
7f58e89433 Jean*0001 #include "CPP_OPTIONS.h"
                0002 
                0003 CStartOfInterface
7412e6d2ad Jean*0004       SUBROUTINE ATM_TO_OCN_MAPXYR8(
7f58e89433 Jean*0005      I           aNx, aNy,
7412e6d2ad Jean*0006      I           fld_atm,
7f58e89433 Jean*0007      I           oNx, oNy,
                0008      O           fld_ocn )
                0009 C     /==========================================================\
                0010 C     | SUBROUTINE ATM_TO_OCN_MAPXYR8                            |
                0011 C     | o Maps atmos. field to ocean field for XY 64-bit float   |
                0012 C     |   field.                                                 |
                0013 C     \==========================================================/
                0014       IMPLICIT NONE
                0015 
                0016 C     == Routine arguments ==
                0017 C     fld_atm - Atmos. grid field
                0018 C     aNx     - Atmos. grid global extent in X
                0019 C     aNy     - Atmos. grid global extent in Y
                0020 C     fld_ocn - Ocean grid field (atmos field will be mapped to this
                0021 C                                 field).
                0022 C     oNx     - Ocean grid global extent in X
                0023 C     oNy     - Ocean grid global extent in Y
                0024       INTEGER aNx
                0025       INTEGER aNy
                0026       Real*8 fld_atm(aNx, aNy)
                0027       INTEGER oNx
                0028       INTEGER oNy
                0029       Real*8 fld_ocn(oNx, oNy)
                0030 CEndOfInterface
                0031 
                0032 C     == Local variables ==
                0033       INTEGER I,J
                0034 
7412e6d2ad Jean*0035 C     Set to zero everywhere
7f58e89433 Jean*0036       DO J=1,oNy
                0037        DO I=1,oNx
                0038         fld_ocn(I,J)=0.
                0039        ENDDO
                0040       ENDDO
                0041 C     Now copy intersection of _atm and _ocn into
                0042 C     _ocn.
                0043       DO J=1,MIN(aNy,oNy)
                0044        DO I=1,MIN(aNx,oNx)
                0045         fld_ocn(I,J)=fld_atm(I,J)
                0046        ENDDO
                0047       ENDDO
                0048 
                0049       RETURN
                0050       END