[MITgcm-support] Control variables in adjoint sensitivity experiments
Nora Loose
Nora.Loose at uib.no
Wed Oct 21 10:15:50 EDT 2015
Hi all,
I am working with the verification experiment tutorial_tracer_adjsens in order to figure out how to set up the control variables in a sensitivity experiment.
I am mostly interested in using surface fluxes as control variables (e.g., wind fields and precipitation). I modified the following files in tutorial_tracer_adjsens/code_ad:
1. I added the package exf to packages.conf
2. I replaced ctrl_map_ini_genarr.F by a copy of pkg/ctrl/ctrl_map_ini_genarr.F, to which I added:
integer igen_windx, igen_precip
igen_windx=0
igen_precip=0
DO iarr = 1, maxCtrlArr2D
if (xx_genarr2d_weight(iarr).NE.' ') then
if (xx_genarr2d_file(iarr)(1:11).EQ.'xx_windx’)
& igen_windx=iarr
if (xx_genarr2d_file(iarr)(1:11).EQ.'xx_precip')
& igen_precip=iarr
endif
ENDDO
if (igen_windx.GT.0)
& call ctrl_map_genarr2d(uwind,igen_windx,myThid)
if (igen_precip.GT.0)
& call ctrl_map_genarr2d(precip,igen_precip,myThid)
The compilation fails and the TAF output file tells me:
file ad_input_code.for:
28709 & call ctrl_map_genarr2d(precip,igen_precip,myThid)
^
*ERROR* : variable precip must be available
^
*ERROR* : identifier not defined
I get the same error for swdown, lwdown, atemp and aqh. However, TAF does not complain about the variable uwind (and vwind).
I checked the file ad_input_code.for and the common blocks including the arrays precip, swdown, lwdown, atemp and aqh are all listed there (alongside with uwind and vwind).
Does anybody have a clue what went wrong?
Thanks in advance for your help,
Nora
More information about the MITgcm-support
mailing list