/[MITgcm]/MITgcm/pkg/atm_compon_interf/atm_store_aim_fields.F
ViewVC logotype

Contents of /MITgcm/pkg/atm_compon_interf/atm_store_aim_fields.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Sep 11 20:17:27 2013 UTC (10 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64o
- regroup per field origin (model & pkgs) the coupling storage routines
   (which accumalate in time each coupling field)
- move bi,bj loops inside atm_store_my_data.F and store alos wind-stress;
  update accordingly + simplify aim_do_physics.F

1 C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/atm_store_atmslp.F,v 1.1 2004/05/21 19:59:38 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6 #ifdef ALLOW_AIM
7 # include "AIM_OPTIONS.h"
8 #endif
9
10 CBOP
11 C !ROUTINE: ATM_STORE_AIM_FIELDS
12 C !INTERFACE:
13 SUBROUTINE ATM_STORE_AIM_FIELDS(
14 I bi, bj,
15 I myTime, myIter, myThid )
16
17 C !DESCRIPTION: \bv
18 C *==========================================================*
19 C | SUBROUTINE ATM_STORE_AIM_FIELDS
20 C | o Routine for saving AIM fields (e.g., surface wind
21 C | speed) for export to coupling layer.
22 C *==========================================================*
23 C | This version interfaces to the AIM package.
24 C *==========================================================*
25 C \ev
26
27 C !USES:
28 IMPLICIT NONE
29
30 C == Global variables ==
31 #ifdef ALLOW_AIM
32 # include "AIM_SIZE.h"
33 #else
34 # include "SIZE.h"
35 #endif
36
37 #include "EEPARAMS.h"
38 #include "PARAMS.h"
39 #include "CPL_PARAMS.h"
40 #ifdef ALLOW_AIM
41 # include "AIM2DYN.h"
42 # include "AIM_CO2.h"
43 #endif
44 C == Global variables for coupling interface ==
45 #include "ATMCPL.h"
46
47 C !INPUT/OUTPUT PARAMETERS:
48 C bi, bj :: Tile indices
49 C myTime :: Current time in simulation (s)
50 C myIter :: Current iteration number
51 C myThid :: My Thread Id. number
52 INTEGER bi, bj
53 _RL myTime
54 INTEGER myIter
55 INTEGER myThid
56 CEOP
57
58 #ifdef ALLOW_AIM
59 C !LOCAL VARIABLES:
60 C i, j :: Loop counters
61 INTEGER i,j
62 _RL cplTimeFraction
63
64 cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)
65
66 C o Accumulate atmospheric surface wind speed (m/s) from AIM pkg
67 C that will be exported to the coupling layer.
68 sWSpeedTime(bi,bj) = sWSpeedTime(bi,bj) + cplTimeFraction
69 DO j=1,sNy
70 DO i=1,sNx
71 sWSpeed(i,j,bi,bj) = sWSpeed(i,j,bi,bj)
72 & + aim_surfWind(i,j,bi,bj)*cplTimeFraction
73 ENDDO
74 ENDDO
75
76 #ifdef ALLOW_AIM_CO2
77 IF ( atmCpl_exchange_DIC ) THEN
78 C o Accumulate atmospheric CO2 from Aim pkg that will be exported
79 C to the coupling layer.
80 airCO2Time(bi,bj) = airCO2Time(bi,bj) + cplTimeFraction
81 DO j=1,sNy
82 DO i=1,sNx
83 airCO2(i,j,bi,bj) = airCO2(i,j,bi,bj)
84 & + aim_CO2(i,j,bi,bj)*cplTimeFraction
85 ENDDO
86 ENDDO
87 ENDIF
88 #endif /* ALLOW_AIM_CO2 */
89
90 #endif /* ALLOW_AIM */
91
92 RETURN
93 END

  ViewVC Help
Powered by ViewVC 1.1.22